easyXDM在IE8上"访问被拒绝"



伙计们

我做了一个简单的easyXDM代码,它不适用于IE8,但在所有其他浏览器中都可以正常工作,请帮助查找我的代码中是否有任何错误。

(我在IE8中遇到拒绝访问错误)。

本地域:

$(document).ready(function(){
    var rpc = new easyXDM.Rpc({
        'local': "lib/name.html",
        'remote': "http://10.74.80.70:1291/XDMtest/query.html",
        'remoteHelper': "http://10.74.80.70:1291/XDMtest/name.html",
        'lazy': false,
        'timeout': 10 * 1000,
        'swf': "lib/easyxdm.swf",
        'swfNoThrottle': true,
        'container': 'embeded'
    },{
        'remote': {
            XDMquery:{}
        },
        'local':{
            getReturn: function(response,callback){                     
                // pass response into callback's parameter
                callback(response);
            }
        }
    });
    rpc.XDMquery({
        "url": "http://10.74.80.70:1291/api/product/GetAllProducts",
        "method":"GET",
        'dataType': 'json',
        'contentType': 'application/json; charset=utf-8',
        "crossDomain": true
    },function(response){
        console.log(response);
        $("h1").text(response.status)
    });
});

远程域:

var xhr;
var internalQuery = function(queryObj,callback){
    $.ajax(queryObj).complete(function(response){
        xhr.getReturn(response,callback);
    })
}
$(document).ready(function(){   
xhr = new easyXDM.Rpc(
    {
            "local": "lib/query.html",
            "swf": "lib/easyxdm.swf",
            "swfNoThrottle": true
        },
        {
            "local": {
                XDMquery: function(obj,callback){
                    internalQuery(obj,callback);
                }
            },
            "remote":{
                getReturn: {}
            }
        }
    );
});

问题来自jquery库,如果在远程服务器中更改为jquery1.10.0,则可以解决此问题。

最新更新