[thelist] Javascript URL variables

Howard Cheng howcheng at ix.netcom.com
Mon Mar 18 15:13:01 CST 2002


Use location.search to get the entire query string. I forget if it includes
the opening "?" or not.

Then split the string on "&" to get name-value pairs. Split once more on
"=" and you can get the value. Don't forget to unescape it as well.

At 12:45 PM 3/18/2002 -0800, ryan manville wrote:
>Curious..
>
>Is there a way to pull URL variables using javascript?
>
>+++++++++++++++++++++++++++++++++++++++++++++++++++
>embeddedObject.html?moviename=Something
>
>so i want to pull the url vairable moviename and pass it back into the page,
>
>Working on doing a redirect to another page via JS and passing the var via
>URL...
>if not is there another good solution to passing js vars from page to page.??

::::::::::::::::::::::
Howard Cheng
howcheng at ix.netcom.com
AIM: bennyphoebe
ICQ: 47319315




More information about the thelist mailing list