Kangry.com [insert cool graphic here]
home | Topics | Logout | Search | Contact | ?? Kangry ?? | Bandwitdh
Topics:
DVR
nvrec
Mplayer
Links
Misc
Commands
Humor

Name

Password

New user

uploaded files
(links)-> (Parent)->Get url query paramaters in javascript submited by Russell Thu 19 Apr 12
Web kangry.com
I played with this a bit to get it to work, here is what I settled on :

var ARG=new Array();
var query="";
URL = window.location.toString();
var x=URL.search(/?/);
if (x>1) // if some paramaters
  {  query=URL.substring(x+1,URL.length); };

var queryList =	query.split("&");
for (var i=0; i<queryList.length; i++) {
   var element = queryList[i].split("=");
   ARG[element[0]]=element[1];
   document.write(element[0] +" ="+ unescape(element[1]) + " ");
};

page=ARG['page'];

Comment out the "document.write" line to hide the output. Read values by reading the array as in the last line page=ARG['page']

This code is very losely based on code I found here:


Add comment or question...:
Subject:
Submited by: NOT email address. Leave blank for anonymous    (Spam Policy)

Enter Text: (text must match image for posting)




This file (the script that presented the data, not the data itself) , last modified Tuesday 06th of March 2018 11:41:12 PM
your client: claudebot
current time: Thursday 28th of March 2024 09:14:51 AM