Javascript Querystring Class
I have always found it difficult to manipulate querystring client side. So i searched for a javascript querystring helper class and found this class by Adam Vandenberg.
I added a couple methods that you may find usefull.
Here's a couple examples on how to use the enhanced class.
var qs = new Querystring();
qs.set("search", "changed");
alert(qs.get("search"));
alert(qs.toString());
alert(qs.indexOfKey("search"));
alert(qs.toAbsoluteUrl());
alert("Removed search : " + qs.remove("search"));
alert("Removed search : " + qs.remove("search"));
qs.set("search", "search added with some empty spaces");
alert(qs.toAbsoluteUrl());
var qs2 = new Querystring("http://www.test.com?search=searchtext&page=1")
alert(qs2.toString());