Xmlhttprequest Readystate Always Undefined
I'm following the PHP/AJAX tutorials at w3schools, and I've hit a bit of a roadblock at square one. Every time I call this function, the readystate is always undefined. function sh
Solution 1:
JS is case sensitive. You need to check the readyState
property, not the readystate
property.
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
console.log(xmlhttp.status);
document.getElementById("txtHint").innerHTML = xmlhttp.responseText;
}
Post a Comment for "Xmlhttprequest Readystate Always Undefined"