Posted on 2003-12-10
I am or have not really ever had to use location.search before.
What i would like is for someone or everyone to educate me a lil bit on it.
Say i have a link like so
and (for example purposes) i have a menu on the destination page, and i would like to search the location, then use document.getElementById("menu"+ id) to set the style's of the active link.
assuming this is a menu, the links would look like so
<a href="blah1.html?id=1" id="menu1">Go</a>
<a href="blah2.html?id=2" id="menu2">Go</a>
<a href="blah2.html?id=3" id="menu3">Go</a>
How would i go about searching the location and getting the id from the query str?
Do you have to use something like window.location.search.split("?") or what