Posted by Jason Nugent on September 10, 1998 at 09:42:11:
In Reply to: Re: Want to make a image changer. Please help. posted by Auke on September 10, 1998 at 08:46:59:
: : Sure.. not difficult.. Post what you have so far and I'll take a look at it. A hint - read my Perl/CGI articles to get you started.
: : Jason
var argsS = location.search.substring (1, location.search.length);
// argsS now contains a list of the arguments passed
// to the URL.
var args = argsS.split ('&'); // split it up on the ampersand.
// and store them in an array.
array now looks something like this:
Remember, the ampersand is used to separate arguments passed to a url.
for (var i = 0 ; i < args.length ; i ++ )
var frags = args[i].split ('='); // split it on the equals sign
var unEscapedFragment = unescape (frags);
// frags because frags contains the optional name
// of the fragment in a name=value pair.
and you can then use unEscapedFragment anywhere you want in your page. I unescape it because certain characters are not allowed in a URL (the tilde, for instance, or spaces). You must hexadecimally convert these back to there 'real' values.