jquery ajax request return status 0 with chrome, but works fine with IE8
I am trying to use jquery/ajax to pull some data from server. The ajax status returned from chrome is 0, but IE8 works fine.
I am banging开发者_JAVA技巧 my head about this issue. I am not doing any crossing web server stuff and tried to use absolute url.
Any other thing to check?
Thanks
Without more details, the best I can do is point you to the following resources and hope you'll see something that looks similar to your setup:
- jQuery Ajax - Status Code 0?
- http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/282972
- http://markos.gaivo.net/blog/?p=109
- http://developsoftware.blogspot.com/2008/10/google-chrome-xmlhttprequest-behaviour.html
Note that the issues are usually cross-site requests or using file:///
instead of http[s]://
try 'return false' at the end of the ajax code in case you are using image instead of button element to submit the form. Worked for me.
精彩评论