Hi Srikanth, I got same issue, so I changed 3rd argument of open method from true to false, and then I got 1,2,3,4 all readyState. Otherwise, I got only 1 readyState as your case.
Regards, Kimitake On Dec 8, 5:53 am, Sree <[email protected]> wrote: > I have this piece of code where it sends an ajax request from a webpage. > > var baseURI = document.baseURI; > var docURI = baseURI.split('#')[1]; > > var url = "some request of my own"; // Not from a different origin > var xmlhttp; > xmlhttp=new XMLHttpRequest(); > xmlhttp.onreadystatechange=function() { > if(xmlhttp.readyState==4) { > alert('ready'); > }}; > > xmlhttp.open("GET",url,true); > xmlhttp.send(); > > This code is not working, even though i dint see any errors in a window when > i open using Ctrl+Shift+J > > where as if I change the if condition to xmlhttp.readyState==1 the alert > fires. with rest of any numbers the alert is not firing. > > Am I doing anything wrong... > > -- > -Thanks > -Srikanth.G -- You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en.
