几个配置上的XmlHttpRequest(0x80040111 / nsIXMLHttpRequest.status)问题 [英] Problem with XmlHttpRequest (0x80040111 / nsIXMLHttpRequest.status) on several configurations

查看:61
本文介绍了几个配置上的XmlHttpRequest(0x80040111 / nsIXMLHttpRequest.status)问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我已经在Ajax / PHP中设计了一个书签,我很快就会把它放在

sourceforge.net上。

但我有一个非常棘手的错误。

我在一些装有Internet Explorer / Windows的计算机上试用它,Firefox

1.07 / Linux,Firefox 1.5 / Linux,Firefox 1.5 / Windows和Firefox 1.5 / Mac,

Safari / Mac。

它可以在很多配置上完美运行,但在某些PC上使用

Firefox 1.5 / Windows(不是全部),带有XmlHttpRequest的Javascript代码

根本不工作,当我刷新网页时我收到了这条消息



------------------------------------ --------------------------------------------------

" Erreur:[异常...]组件返回失败代码:0x80040111

(NS_ERROR_NOT_AVAILABLE)[nsIXMLHttpRequest.status]" nsresult:

" 0x80040111(NS_ERROR_NOT_AVAILABLE)" location:JS frame ::
http:// someWebServer / BookmarkAjax / js / requestor.js :: anonymous :: line

52"数据:否]

Fichier来源: http:// someWebServer /BookmarkAjax/js/requestor.js

Ligne:52"

------------------ -------------------------------------------------- ------------------


以下是来源:

------- -------------------------------------------------- -----------------------------

" function getReadyStateHandler(req,responseXmlHandler){

//返回一个侦听XMLHttpRequest的匿名函数

实例

返回函数(){

//如果请求'的状态是'完成'

if(req.readyState == 4){


//检查是否收到了成功的服务器响应

Hi,

I''ve designed a bookmark in Ajax / PHP that I will put soon on
sourceforge.net.
But I''ve got an very tricky bug.
I try it on some computers with Internet Explorer/Windows, Firefox
1.07/Linux, Firefox 1.5/Linux, Firefox 1.5/Windows and Firefox 1.5/Mac,
Safari/Mac.
It works perfectly on a lot of configurations but, on some PC with
Firefox 1.5/Windows (not all), the Javascript code with XmlHttpRequest
don''t work at all and I''ve got this message when I refresh the webpage
:
--------------------------------------------------------------------------------------
"Erreur : [Exception... "Component returned failure code: 0x80040111
(NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult:
"0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
http://someWebServer/BookmarkAjax/js/requestor.js :: anonymous :: line
52" data: no]
Fichier source : http://someWebServer/BookmarkAjax/js/requestor.js
Ligne : 52"
--------------------------------------------------------------------------------------

Here is the source :
--------------------------------------------------------------------------------------
"function getReadyStateHandler(req, responseXmlHandler) {
// Return an anonymous function that listens to the XMLHttpRequest
instance
return function () {
// If the request''s status is "complete"
if (req.readyState == 4) {

// Check that a successful server response was received

L.52>>>> if(req.status == 200){
L.52 >>>> if (req.status == 200) {




//将响应的XML有效负载传递给

//处理函数

var debug = document.getElementById(" debug");

debug.innerHTML + ="< br />" ; + req.status +" " + req.statusText;


responseXmlHandler(req.responseXML);


} else {..."

------------------------------------------------ --------------------------------------

这一来源代码来自IBM的文章:
http://www-128.ibm.com/developerwork...dgr-lnxw01Ajax


这很奇怪,因为它正在研究一些配置,而不是其他所有的b $ b,都基于Firefox 1.5 / Windows ....

网上有很多关于网页的消息这种错误,但是我没有找到这个确切的案例!

如果有人能帮助我,我会很高兴。

(我可以通过电子邮件为您提供访问Web应用程序的权限,如果您不想再用这个错误获得


谢谢 - Greg



// Pass the XML payload of the response to the
// handler function
var debug = document.getElementById("debug");
debug.innerHTML += "<br/>" + req.status + " " + req.statusText;

responseXmlHandler(req.responseXML);

} else { ..."
--------------------------------------------------------------------------------------
This piece of source code comes from an IBM''s article :
http://www-128.ibm.com/developerwork...dgr-lnxw01Ajax

It''s very strange because it is working on some configurations and not
at all on others, all based on Firefox 1.5/Windows....
There''s a lot of message on the web about this kind of error but I
don''t find this exactly case !
I would be glad if somebody could help me.
(I can give you an access on the web application by email if you wan''t
to reproduce this bug)
Thanks - Greg

推荐答案

我还有问题。

我找不到原因。
I''ve still got the problem.
I can''t find why.


Greg写道:
我还有问题。
我找不到原因。
I''ve still got the problem.
I can''t find why.



你试过吗(req.status& ;&安培; req.status == 200)?


-

Ian Collins。


Have you tried if (req.status && req.status == 200)?

--
Ian Collins.




Greg写道:

Greg wrote:

我已经在Ajax / PHP中设计了一个书签,我将很快将其放在
sourceforge上。 net。
但我有一个非常棘手的bug。
我在一些使用Internet Explorer / Windows,Firefox
1.07 / Linux,Firefox 1.5 / Linux,Firefox 1.5 /的计算机上试用它。 Windows和Firefox 1.5 / Mac,Safari / Mac。
它可以在很多配置上完美运行,但是在某些带有Firefox 1.5 / Windows(不是全部)的PC上,Javascript代码与XmlHttpRequest
根本不工作,当我刷新网页时我收到了这条消息

---------------- -------------------------------------------------- --------------------
Erreur:[Exception ...组件返回失败代码:0x80040111
(NS_ERROR_NOT_AVAILABLE)[nsIXMLHttpRequest .STATUS] QUOT; nsresult:
" 0x80040111(NS_ERROR_NOT_AVAILABLE)" location:JS frame ::
http:// someWebServer / BookmarkAjax / js / requestor.js :: anonymous :: line
52"数据:否]
Fichier来源: http:// someWebServer / BookmarkAjax / js /requestor.js
Ligne:52"
------------------------------ -------------------------------------------------- ------

这是来源:
--------------------------- -------------------------------------------------- ---------
" function getReadyStateHandler(req,responseXmlHandler){
//返回一个监听XMLHttpRequest
实例的匿名函数
返回函数( ){
//如果请求'的状态是完成
if(req.readyState == 4){

//检查服务器响应是否成功收到
Hi,

I''ve designed a bookmark in Ajax / PHP that I will put soon on
sourceforge.net.
But I''ve got an very tricky bug.
I try it on some computers with Internet Explorer/Windows, Firefox
1.07/Linux, Firefox 1.5/Linux, Firefox 1.5/Windows and Firefox 1.5/Mac,
Safari/Mac.
It works perfectly on a lot of configurations but, on some PC with
Firefox 1.5/Windows (not all), the Javascript code with XmlHttpRequest
don''t work at all and I''ve got this message when I refresh the webpage
:
--------------------------------------------------------------------------------------
"Erreur : [Exception... "Component returned failure code: 0x80040111
(NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult:
"0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
http://someWebServer/BookmarkAjax/js/requestor.js :: anonymous :: line
52" data: no]
Fichier source : http://someWebServer/BookmarkAjax/js/requestor.js
Ligne : 52"
--------------------------------------------------------------------------------------

Here is the source :
--------------------------------------------------------------------------------------
"function getReadyStateHandler(req, responseXmlHandler) {
// Return an anonymous function that listens to the XMLHttpRequest
instance
return function () {
// If the request''s status is "complete"
if (req.readyState == 4) {

// Check that a successful server response was received
L.52>>>> if(req.status == 200){
L.52 >>>> if (req.status == 200) {


//将响应的XML有效负载传递给
//处理函数
var debug = document.getElementById(" debug");
debug.innerHTML + ="< br />" + req.status +" " + req.statusText;

responseXmlHandler(req.responseXML);

} else {..."
---------- -------------------------------------------------- --------------------------
这段源代码来自IBM的文章:
http://www-128.ibm .com / developerwork ... dgr-lnxw01Ajax

这很奇怪,因为它正在处理某些配置,而不是其他所有配置,都基于Firefox 1.5 / Windows ....
网上有很多关于这种错误的消息但是我没有找到这个确切的情况!
我很高兴如果有人可以帮助我。
(如果你不想重现这个bug,我可以通过电子邮件给你访问网页应用程序)
谢谢 - Greg



// Pass the XML payload of the response to the
// handler function
var debug = document.getElementById("debug");
debug.innerHTML += "<br/>" + req.status + " " + req.statusText;

responseXmlHandler(req.responseXML);

} else { ..."
--------------------------------------------------------------------------------------
This piece of source code comes from an IBM''s article :
http://www-128.ibm.com/developerwork...dgr-lnxw01Ajax

It''s very strange because it is working on some configurations and not
at all on others, all based on Firefox 1.5/Windows....
There''s a lot of message on the web about this kind of error but I
don''t find this exactly case !
I would be glad if somebody could help me.
(I can give you an access on the web application by email if you wan''t
to reproduce this bug)
Thanks - Greg




替换:

if(req.status == 200)


to:

如果(req.status == 200)||(req.status == 0))


如果有帮助,请问我的原因(你欠我一瓶好的波尔多

年:-D



Replace:
if (req.status == 200)

to:
if (req.status == 200)||(req.status == 0))

If it helps, ask my why (and you owe me a bottle of Bordeaux of a good
year :-D


这篇关于几个配置上的XmlHttpRequest(0x80040111 / nsIXMLHttpRequest.status)问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆