Last active
December 12, 2015 07:18
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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