I am curious as to why my AJAX-call is failing in Google Chrome, it works perfectly fine in Firefox. Before anyone asks, no I'm not using JQuery because I need to have access to readyState == 3 which JQuery doesn't seem to have.
My script currently looks like this(with large unneccessary parts stripped out):
main = new XMLHttpRequest();
main.open("GET", "", true);
var lastResponse = '';
var statusString = 'Step 1(of 3), please wait... ';
main.onreadystatechange = function()
if( main.readyState == 1 )
$("#ajax-status").html( statusString );
// If there's been an update
if( main.readyState == 3 )
if( main.readyState == 4 )
It works perfectly in Firefox but in Chrome it doesn't even alert anything so it doesn't even get into readyState 1(which is when you send it) -- that seems rather odd..
Any ideas?? stackoverflow.com/questions/287286/â€¦
以上就是Why is my AJAX-call failing in Google Chrome?的详细内容，更多请关注web前端其它相关文章！