Click to See Complete Forum and Search --> : querystring in javascript


raghu
03-31-2003, 08:19 PM
Hi,

I have a the following URL -->
http://localhost/test/help/help.htm?t=myhelp.htm#4 in the address bar.


I need to retrieve the value of t in javacript.
Similar to request.querystring("t")

HOW CAN I DO THIS

Thanks in advance.

AdamBrill
03-31-2003, 08:30 PM
Try this:

t = String(document.location).split(/\?.+\=/i)[1];

Then t will be the value of t in the address bar... :)