Forum Moderators: open
The URL would contain something like this:
?product=toy&price=12&color=blue
I want to grab this data to prefill parts of a form. (hope that makes sense)
location.hrefstring which contains all the info and break it down to get what you want.
In brief... find where the querystring starts with .indexOf('?') and remove the part of the querystring past the # (if present). split('&') the querystring into an array of key/value pairs, then I guess you can split('=') it further to ultimately get an associative array in the form: param['key'] = 'value' etc...?