[thelist] JavaScript and GET name value pairs
Tom Dell'Aringa
pixelmech at yahoo.com
Wed Dec 18 11:14:01 CST 2002
I have a need to pull some GET name/value pairs using JS (long story,
I have no choice). I've been struggling with some code I found on the
net and wondered if anyone here has done this.
The first thing is I have a test page that sends the get variables.
It is simply this form:
<form method="get" name="test"
action="getVars.html?food=eggs&drink=beer">
<input type="submit" value="submit">
</form>
Then the code I found does a few things, first it pulls the location
to get the whole string like this:
query = this.location.href;
This gives me:
file:///C:/getVars.html?
Notice, this has NOT grabbed the GET variables in the string..anyone
know why? Does anyone have a good script for doing this? What I have
found on the net has been wanting or old.
TIA
Tom
=====
var me = tom.pixelmech.webDeveloper();
http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
More information about the thelist
mailing list