Friday, May 10, 2024
101
rated 0 times [  104] [ 3]  / answers: 1 / hits: 19419  / 13 Years ago, sun, december 11, 2011, 12:00:00

I'm trying to use microsoft XDomainRequest to send cross domain request.
Here is the code




...
if ($.browser.msie && window.XDomainRequest) {
// Use Microsoft XDR
var xdr = new XDomainRequest();
xdr.open(POST, http://graph.facebook.com/1524623057/);

xdr.send();
}
....



It gives SCRIPT5: Access is denied. error on xdr.open(...) line.


More From » internet-explorer

 Answers
8

I found the reason of this problem. As stated in Point 7:



Requests must be targeted to the same scheme as the hosting page


This restriction means that if your AJAX page is at http://example.com, then your target URL must also begin with HTTP. Similarly, if your AJAX page is at https://example.com, then your target URL must also begin with HTTPS.



[#88618] Friday, December 9, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mckenna

Total Points: 445
Total Questions: 109
Total Answers: 109

Location: Virgin Islands (U.S.)
Member since Sun, May 16, 2021
3 Years ago
;