I got a URL like this:
http://google.de/test.php?a=b&c=d&e=f
I know got to modify just one of the GET params like this: (c
is "h" instead of "d")
http://google.de/test.php?a=b&c=h&e=f
and redirect to the new url. All other GET params should stay the same.
How am I going to do this?
You can try something like this:
as mentioned
window.location.search
will give you the query string with?
included.I would then turn these into an object (perhaps with a library like http://github.com/medialize/URI.js) to make it easier to work with the params. like
var params = { key: value, key1: value1}
You could then modify the value you wanted and convert your key value pairs back to a query string.
After this you could use
window.location
to move the user to next page.