So I need to use variables passed in the url for dhtml calculations. Can anyone help me do this? Thanks!
Aaron
Printable View
So I need to use variables passed in the url for dhtml calculations. Can anyone help me do this? Thanks!
Aaron
You can use location.search!
See it in action here! http://ashutoshsaxena.tripod.com/jst.../realjs11.htmlCode:function decodeSearchString() {
var nameValue = new Array();
var searchStr = unescape(location.search.substring(1));
if (searchStr) {
var formElement = searchStr.split("&");
var tmpArray = new Array();
for (k = 0; k < formElement.length; k++) {
tmpArray = formElement[k].split("=");
nameValue[tmpArray[0]] = tmpArray[1];
}
}
return nameValue
}
hey thanks. :)
No Problem! Here to help(When I can!)! :tup: