I have user entered data that is being posted to different domain and a different protocol. After doing some reading, I discovered that Microsoft's XDomainRequest
object doesn't allow for cross-origin interactions (Different protocols, ports, #7 here.
I'm doing a standard CORS AJAX call for FF, Safari, and Chrome (which works), and I've been trying to use the XDomainRequest object for IE9.
if ($.browser.msie && window.XDomainRequest) {
var xdr = new XDomainRequest();
xdr.open("post", "https://_url_here");
xdr.send( post_data );
}else { $.ajax(params); }
When I opened an https
version of the origin site, it successfully sent data to the receiving url, but it couldn't parse any of the data. xdr.send(post_data);
"looks" like when it's being sent, I wasn't able to find info on that or see it in the console. I looked at this but couldn't quite get it; console responded: Unable to get value of the property 'postMessage': object is null or undefined
if ($.browser.msie && window.XDomainRequest) {
var domain = $("iframe").contentWindow;
domain.postMessage( post_data );
}else {
$.ajax(params);
}
Can anyone offer me some help with this?