When I try to compare a string to a .nodeValue it always fails, even if they are same. From what I've read typecasting is automatic in javascript or is this incorrect?
For instance
var myGreet = "Hello";
var myFrag = myXML.lastChild.firstChild.firstChild.childNodes[0].nodeValue; //returns Hello
if(myGreet == myFrag){ // always returns false
alert(myFrag);
}

New Topic/Question
Reply



MultiQuote




|