+ -
当前位置:首页 → 问答吧 → Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)报错

Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)报错

时间:2011-07-15

来源:互联网

JScript code
    try {
            xmlhttp.send(queryParams);
            this.stopTimer(timerKey);
        } catch (e) {
            alert(e);
}


之后报错
Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "xxxx :: <TOP_LEVEL> :: line 191" data: no

请问是什么原因 我学习别人代码自己写了一段 
他源代码中还有这么一段JScript code
    getNsResolver : function() {
        var client = this;
        return function(prefix) {
            var ns = {
            's':  "http://schemas.xmlsoap.org/soap/envelope/",  // SOAP namespace
            'ec2': "http://ec2.amazonaws.com/doc/"+client.Version+"/"   // EC2 namespace, must match request version
            };
            return ns[prefix] || null;
        }
    },

但是他源代码中根本没有用到...是不是这个function的问题?

作者: Annsenuk   发布时间: 2011-07-15

ajax不是都有现成的方法吗?需要自己写兼容性太差

作者: xuexiaodong2009   发布时间: 2011-07-15

"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)错误应该是ajax请求的url跨域了

参考
AJAX跨域问题解决办法

作者: showbo   发布时间: 2011-07-15

看都看不懂,学点简单的嘛

作者: lsw645645645   发布时间: 2011-07-15