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

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -