javascript - AJAX ReadyState 4 Status 200 but responseText undefined -


i have html , php file:

test.html:

var req = new xmlhttprequest(); req.onreadystatechange = function() {     if (req.readystate==4 && req.status == 200) {       var dat = req.reponsetext;       alert("status text: " + req.statustext);       alert("response: " + dat);     }   };  req.open("get", "info.php", true); req.send(); 

and info.php:

<?php echo "test"; ?> 

accessing info.php shows "test" expected, responsetext ajax request undefined. missing here?

typo typo typo

var dat = req.reponsetext;                ^^^ 

Comments

Popular posts from this blog

android - questions about switching from C2DM to GCM -

c++ - Qt setGeometry: Unable to set geometry -

batch file - How to extract all multi-volume RAR archives from subfolders of a folder? -