getURLParam: use Prototype
This commit is contained in:
parent
10690c19da
commit
ec320224db
24
functions.js
24
functions.js
|
@ -370,28 +370,8 @@ function dropboxSelect(e, v) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// originally stolen from http://www.11tmr.com/11tmr.nsf/d6plinks/MWHE-695L9Z
|
function getURLParam(param){
|
||||||
// bugfixed just a little bit :-)
|
return String(window.location.href).parseQuery()[param];
|
||||||
function getURLParam(strParamName){
|
|
||||||
var strReturn = "";
|
|
||||||
var strHref = window.location.href;
|
|
||||||
|
|
||||||
if (strHref.indexOf("#") == strHref.length-1) {
|
|
||||||
strHref = strHref.substring(0, strHref.length-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( strHref.indexOf("?") > -1 ){
|
|
||||||
var strQueryString = strHref.substr(strHref.indexOf("?"));
|
|
||||||
var aQueryString = strQueryString.split("&");
|
|
||||||
for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
|
|
||||||
if (aQueryString[iParam].indexOf(strParamName + "=") > -1 ){
|
|
||||||
var aParam = aQueryString[iParam].split("=");
|
|
||||||
strReturn = aParam[1];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return strReturn;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function leading_zero(p) {
|
function leading_zero(p) {
|
||||||
|
|
Loading…
Reference in New Issue