Hi
I have a similar problem.
I know you can get the query string from the page's url with window.location.search, but evaluating that string is another matter. I would like to be able to get values from a string using a function.
For example:
url?firstname=john&lastname=smith
A function call such as:
Code:
getQueryStringValue('lastname');
should return 'smith'.
I'm guessing this would involve using regular expressions somehow, but this is definitely not my area of expertise.
It would also be nice to be able to change values in the query string,
for example:
Code:
changeQueryStringValue('lastname','brown');
should change the url to:
url?firstname=john&lastname=brown
Thanks for your help
EDIT: Found another post which answers my question: http://www.dynamicdrive.com/forums/s...t=query+string
Bookmarks