Access denied to jQuery script on IE

IE requires you to use XDomainRequest instead of XHR for cross site, you can try something like…

if ($.browser.msie && window.XDomainRequest) {
            // Use Microsoft XDR
            var xdr = new XDomainRequest();
            xdr.open("get", url);
            xdr.onload = function() {
                // XDomainRequest doesn't provide responseXml, so if you need it:
                var dom = new ActiveXObject("Microsoft.XMLDOM");
                dom.async = false;
                dom.loadXML(xdr.responseText);
            };
            xdr.send();
        } else {
            // your ajax request here
            $$.ajax({
                   url: thisURL,
                   dataType: "json",
                   data: {cmd : 'getMessage', uurl: urlVar, t: Math.random()},
                   success: function(ret){
                               callback(ret)
                    }
            });

        }

Reference

http://forum.jquery.com/topic/cross-domain-ajax-and-ie

not sure whether it fits your scenario

xdr = new XDomainRequest(); 
xdr.onload=function()
{
    alert(xdr.responseText);
}
xdr.open("GET", thisUrl); //thisURl ->your cross domain request URL 
//pass your data here
xdr.send([data]); 

you can find some more guidance here

Leave a Comment