[thelist] java script and forms
Oliver Lockwood
isdarksaber at hotmail.com
Thu Jun 7 10:11:44 CDT 2001
cheers for that but I don't know how to use a url "scope" ro recall the
values so I'm still suck!! How do I do this?
>:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>: From: Oliver Lockwood
>:
>:
>: brotherb.html?mfa=asdf&mfb=asdf&mfc=asdf&ffa=asdf
>:
>: I'm just wondering how I actually recall these
>: variables in the new page??
>:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>if you've gotta do it client-side, then you only need 8 lines of script to
>accomplish it.
>
>var qs = location.search.substring(1);
>var nv = qs.split('&');
>var url = new Object();
>for(i = 0; i < nv.length; i++)
>{
> eq = nv[i].indexOf('=');
> url[nv[i].substring(0,eq).toLowerCase()] = unescape(nv[i].substring(eq +
>1));
>}
>
>the variables will now be available in a url "scope".
>
>url.mfa, url.mfb, url.mfc, url.ffa, etc.
>
>good luck,
>
>.jeff
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
More information about the thelist
mailing list