How can I check if the query string contains a q= in it using JavaScript or jQuery?
q=
I've used this library before which does a pretty good job of what you're after. Specifically:-
qs.contains(name) Returns true if the querystring has a parameter name, else false. if (qs2.contains("name1")){ alert(qs2.get("name1"));}