I use the following to parse the url
var srch = window.location .search.substri ng(1);
// then split srch at the ampersand:
var parts = srch.split("&") ;
// write the parameters into the variables
for(var i in parts) {
var temp = parts[i].split("=");
if (temp[0] == "xx") { xx = 1 * temp[1]; }
if (temp[0] == "yy") { yy = 1 * temp[1]; }
if (temp[0] == "ff") { ff = 1 * temp[1]; }
if (temp[0] == "level") { level = 1 * temp[1]; }
}
However, when I parse the url, it consistently chokes when presented
with an ampersand character. Do I need to escape this character somehow?
--
--
Fabian
Visit my website often and for long periods!
var srch = window.location .search.substri ng(1);
// then split srch at the ampersand:
var parts = srch.split("&") ;
// write the parameters into the variables
for(var i in parts) {
var temp = parts[i].split("=");
if (temp[0] == "xx") { xx = 1 * temp[1]; }
if (temp[0] == "yy") { yy = 1 * temp[1]; }
if (temp[0] == "ff") { ff = 1 * temp[1]; }
if (temp[0] == "level") { level = 1 * temp[1]; }
}
However, when I parse the url, it consistently chokes when presented
with an ampersand character. Do I need to escape this character somehow?
--
--
Fabian
Visit my website often and for long periods!
Comment