Possible Duplicate:
Get QueryString values in Javascript
Hey all,
ive read and read and i feel im missing something so im going to ask.
what im trying to do:
get the url params from page using jquery.
function findIt() {
$.ajax({
url: "${url.context}/itemlist/getitemlist",
params: "foobar",
context: document.body,
success: function (data) {
$('#results').html(data);
}
});
};
the url in which im sending the params to is where i need to grab the parameters using jquery.
e.g. in Php:
$foo = $_GET['name']
in jquery?????
i know this has to be simple, but im lost. any help would be appreciated.