1

Guys

I made a simple easyXDM code, it do not work on IE8, but works fine in all the other browsers, please help to find if I made any mistakes in my code.

(I got access denied error in IE8).

Local Domain:

$(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)
    });
});

Remote Domain:

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: {}
            }
        }
    );
});
Garnet
  • 11
  • 3
  • Are you asking for a Code Review to make sure it's as good as possible, or debugging help with IE8 specifically? If the former, I'd recommend cleaning it up a bit and asking over on [that SE](http://codereview.stackexchange.com/); if the latter, trim it down and retag it. – Nathan Tuggy Jan 22 '15 at 01:33
  • Hi Guys, thank you for your reply, I found the reason why it is denied. Becasue I used jQuery 1.11 version which do not fully support easyXDM. – Garnet Jan 22 '15 at 08:57
  • I'd recommend you add that as an answer then, preferably with some more details to help others, and mark it accepted. – Nathan Tuggy Jan 22 '15 at 09:07

1 Answers1

0

The problem is coming from jquery library, if change to jquery1.10.0 in remote server, this problem can be fixed.

Garnet
  • 11
  • 3