Hi guys. I’m developing this application for facebook and it works just fine except for IE8 and inside facebook tab.
I have the browser in develop mode and I’m getting an access denied error when I try to call my webservices with this code:
var isIE8 = window.XDomainRequest ? true : false;
if (isIE8) {
myReq = new window.XDomainRequest();
myReq.onload = $callback;
myReq.open("GET", $url, true);
myReq.send();
} else {
myReq = new createXMLHttpRequest();
myReq.onreadystatechange = $callback;
myReq.open("GET", $url, true);
myReq.setRequestHeader("Content-Type", "text/xml;charset=utf-8");
myReq.send();
}
I have the IE8 conditional because I was trying to solve with this tutorial: http://www.leggetter.co.uk/2010/03/12/making-cross-domain-javascript-requests-using-xmlhttprequest-or-xdomainrequest.html
And yes, I configured my webservices with: Access-Control-Allow-Origin: *
I’ve tried the jQuery.ajax() function as well, but it’s event stranger. When I use it it works in all browser except again in IE8 but I don’t receive any error, it’s like that request isn’t there.
Is there any other way to make ajax requests or any solution for this?