Skip to content

Instantly share code, notes, and snippets.

@djadriano
Last active December 12, 2015 07:18
Show Gist options
  • Save djadriano/4735242 to your computer and use it in GitHub Desktop.
Save djadriano/4735242 to your computer and use it in GitHub Desktop.
solution for xdr and cross domain problem with ie when you need make a ajax request or send.
if ($.browser.msie && window.XDomainRequest) {
var xdr = new XDomainRequest();
xdr.open("POST",'http://yoururl.com');
xdr.send( ajax_data );
xdr.onerror = function(){
console.log('error');
};
xdr.onload = function(){
console.log(xdr.responseText);
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment