I have a strange problem where I can't set a variable or something else is going on.
here is a simple function I'm using
//the string I'm passing in is a url
//ie
http://www.mywebsite.com/public/index.asp?x=2323
function validate(str){
alert(str); //this works
var strnew = str;
alert(strnew); //this works
alert("test" + strnew.length); //this doesn't work.I get an undefined
//but if I do something like this
var strnew1 = "http://www.mywebsite.com/public/index.asp?x=2323";
alert("test1" + strnew1.length); //this works
}
What am I missing here ?