XMLHttpRequest problem

左心房为你撑大大i 提交于 2019-12-11 11:00:55

问题


I am writing one Web Application using XUL. In that Iam using AJAX XMLHttpRequest Object for sending request to server. When I use GPRS connection to send the request to the server from my web application the request is not going, but readyState has changed to 4 and status=0. If the request is not going out how the readyState is Changing.

The same Code working fine in local network. If I send the request to server from the browser using GPRS it is working fine. Can any body help me out in solving this problem.

Thanks in Advance.


回答1:


the request is not going

How do you determine that?

Do you use the HTTP scheme? If so, status == 0 is an issue, (google says there are known quirks in Firefox).

status == 0 is also returned when the request is using a non-HTTP protocol. So if you're making a file:// request accidentally, it would explain all the symptoms...

[edit 2009-09-07] Also found this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=488605 aborted XMLHttpRequests have status==0 since Firefox 3.

[edit] I'm not /quite/ sure, but I think that cross-domain requests that are not allowed also end up with status == 0.



来源:https://stackoverflow.com/questions/1037449/xmlhttprequest-problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!