PDA

View Full Version : retrieve variables from the location bar


dreamingdigital
01-22-2003, 10:24 PM
How would i retrieve this variable: Product_Code=101

From having this in the location bar: http://www.granisle.com/miva/merchant.mv?Screen=PROD&Product_Code=101

And input it into a text input.
<type=hidden name=Product_Code value=null>

CP

chrismiceli
01-22-2003, 10:32 PM
you could split the location
parent.location.href = test;
productcode = test.split("&");
productcode = productcode[0].split("=");
productcode = productcode[1];
I also think that there is some server side variable in mySQL or something, i believe it is QUERYSTRING or something.

mordred
01-22-2003, 10:34 PM
I'll take the job at plugging beetle's script, as it will prove quite helpful for your purpose:
http://www.codingforums.com/showthread.php?s=&threadid=4555&highlight=getVars

dreamingdigital
01-23-2003, 01:28 AM
excellent.
I mod'ed the script to suit my needs. thanks!

CP