/[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

Annotation of /trunk2/out/js/getargs.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 396 - (hide annotations)
Thu Jul 22 19:00:27 2004 UTC (19 years, 9 months ago) by dpavlin
File MIME type: application/javascript
File size: 499 byte(s)
JavaScript sucks: re-implemented unescape to produce ISO-8859-2 charset
(and not ISO-8859-2), unac function to remove accented characters from
ISO-8859-2, use l2_unescape, new results output

1 dpavlin 391 /**
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 dpavlin 396 args[argname] = l2_unescape(value);
17 dpavlin 391 }
18     return args;
19     }

  ViewVC Help
Powered by ViewVC 1.1.26