dzLib.js
|
getParameter-object (querystring) | |
jsEssentials
dateLib
jsStrings
Controls
Tools
Navigate
|
Description: Usage//Access the querystring var oQS=new getParameter(); if(oQS.strName!=null) { alert('Supplied name is '+oQS.strName); } //Create a GET request without a form (and automatic escaping) var oQS=new getParameter(); oQS.clearAll(); oQS.strName='Your Name'; oQS.strEmail='your.name@domain.com'; document.writeln(oQS.toString()); Live Democurrent QueryStringThere's no querystring parameter supplied with URL Want an QS-example: name and email. There's also a pretty long one. //The Demo Code var oQS=new getParameter(), bln=false; for(var i in oQS) { if(typeof oQS[i]=='string') { document.writeln('<strong>'+i+'</strong>: '+oQS[i]+'<br>'); bln=true; } } if(!bln) { document.writeln('<em>There\'s no querystring parameter supplied with URL</em>'); } |