Always hated the lack of $_GET in javascript ... so...

var $_GET = {}, uri = window.location.href;

if(uri.indexOf('?') > -1)
{
        uri.substring(uri.indexOf('?') + 1).split('&').each(function(element)
        {
                var item = element.split('=');
                $_GET[decodeURIComponent(item[0])] = 
decodeURIComponent(item[1]);
        }, this);
}

Reply via email to