Can someone tell me why this script isn't running properly in Firefox yet it does in IE:
Works fine in IE, but in FF it doesn't set s to anything, it just leaves it blank.
Code:
var s = "";
var queryString = window.location.href.substring((window.location.href.indexOf('?') + 1));
var array1 = queryString.split('&'); // Each array element is in format "fieldname=value"
for(var i = 0; i < array1.length; i++){
var tempArray = array1[i].split('='); // Separate fieldname and value
eval(tempArray[0] + " = \"" + tempArray[1] + "\"");
}
document.write("length=" + s.length);
if (s.length==0)
{
s = "lcd";
alert(s);
}