Menu
I’m trying to test the value of an element returned as part of the responseText array from an Ajax call. If I simply do alert(response[8]);, I get the value of the field, which is “yes”. However, if I do the following:
if(response[8]==”yes”){
alert(“It’s true”);
} else {
alert(“It’s false”);
}
the alert always shows “It’s false”, even when the alert above shows a value of “yes”. Nothing I do seems to compel this if check to read anything in that response[8] element. I am truly stumped. Any suggestions? Am I missing something obvious?