/[webpac]/trunk2/out/js/getargs.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk2/out/js/getargs.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 447 - (show annotations)
Wed Sep 15 16:51:24 2004 UTC (19 years, 6 months ago) by dpavlin
File MIME type: application/javascript
File size: 600 byte(s)
l2_unescape can be loaded or not

1 /**
2 From David Flanagan's, _Javascript:_The Definitive_Guide_, pg. 214,
3 published by O'Reilly, 4th edition, 2002
4 */
5 function getArgs()
6 {
7 var args = new Object();
8 var query = location.search.substring(1);
9 var pairs = query.split("&");
10 for(var i=0; i<pairs.length; i++)
11 {
12 var pos = pairs[i].indexOf('=');
13 if(pos == -1) continue;
14 var argname = pairs[i].substring(0,pos);
15 var value = pairs[i].substring(pos+1);
16 //debug("args["+argname+"] = "+value);
17 if (document.l2_unescape) args[argname] = l2_unescape(value);
18 else args[argname] = value;
19 }
20 return args;
21 }

  ViewVC Help
Powered by ViewVC 1.1.26