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: {}
}
}
);
});