0

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.

Community
  • 1
  • 1

1 Answers1

1

See How can I get query string values in JavaScript? for tons of possible solutions.

Community
  • 1
  • 1
ThiefMaster
  • 310,957
  • 84
  • 592
  • 636