Simple XmlHttpRequest AJAX not outputting desired status code -
my first , simple ajax request not outputting "status 200 ok".. , instead outputs "0" .. what's wrong?
function doit(){ var httpxml = new xmlhttprequest(); httpxml.onreadystatechange = function(){ if(httpxml.readystate == 4) { alert(httpxml.status); } } httpxml.open("get", "http://localhost/test/rough/test.php", true); httpxml.send(null); } doit();
the main reason status 0 has run disk , not through webserver.
Comments
Post a Comment