[thelist] JavaScript and GET name value pairs

Tom Dell'Aringa pixelmech at yahoo.com
Wed Dec 18 21:12:01 CST 2002


--- ".jeff" <jeff at members.evolt.org> wrote:
> tom,
>
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > From: Tom Dell'Aringa
> >
> > 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.
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> i see you've gotten lots of code samples to help with this, but i
> thought
> i'd add mine into the mix because i originally wrote it as an
> alternative to
> all the bulky or inflexible code samples to accomplish the same
> task.
>
> http://members.evolt.org/jeff/code/js_url_variables/index.cfm
>
> you would reference the url variables from your example like this:
>
> url.food or url['food']
> url.drink or url['drink']

Thanks for the code Jeff, as usual concise and works perfectly. Quick
question - how does the object reference url.name resolve when the
code snippet never actually 'runs' - its not a function that gets
called via an event. Does the stating of the object reference create
the object and run the code?

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