[thelist] java script and forms

.jeff jeff at members.evolt.org
Wed Jun 6 12:06:16 CDT 2001


oliver,

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: 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

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/






More information about the thelist mailing list