Hi -
How do I retrieve the value of a URL encoded variable using only javascript?
example: www.dave.com?id=1
I want to get the 1 into a javascript variable...
Thanks,
Dave
| SitePoint Sponsor |


Hi -
How do I retrieve the value of a URL encoded variable using only javascript?
example: www.dave.com?id=1
I want to get the 1 into a javascript variable...
Thanks,
Dave




I'm assuming you are using ASP, but this should work with all scripting languages. You could just write the value out like so.
Code:myVar = <%= Request.QueryString("ID") %>;
Bookmarks