[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"
<input type="submit" value="submit">

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:


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.



var me = tom.pixelmech.webDeveloper();

[Making A Commercial Case for Adopting Web Standards]

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

More information about the thelist mailing list