F
Fabian
I use the following to parse the url
var srch = window.location.search.substring(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.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?
var srch = window.location.search.substring(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.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?