xdomainrequest

XDomainRequest problem

放肆的年华 提交于 2020-01-02 02:20:48
问题 I'm trying to make a asynchronous call to a service that returns json using XDomainRequest (IE8). The problem is that i always get an error (the onerror event is fired, and the responseText is always null), i'm using fiddler to check the response of the service and i seems right (I can see the json object returnig), this only happen in IE8 when using XDomainRequest, the same functionality implemented in JQuery works fine. Any clue would be appreciated. Thanks! P.S.: This is my javascript code

XDomainRequest unspecified error in ie8

落爺英雄遲暮 提交于 2019-12-24 07:26:52
问题 I am trying to make a http GET request in IE8. This works fine in all other browsers and in IE8 when using jQuery but not the native method. I also tried another endpoint I have but no luck. All it returns is 'Unspecified error.' in the console on the xdr.send() line. var xdr = new XDomainRequest(); xdr.open("get", 'http://localhost/jump/test'); xdr.onload = function () { alert("Loading"); alert(xdr.responseText); }; xdr.onsuccess = function() { alert("Success!"); alert(xdr.responseText); };

Posting Cross Domain AJAX/XDomainRequest to Web Service

≯℡__Kan透↙ 提交于 2019-12-24 00:58:02
问题 I have spend a LOT of time reading through all the various posts here and on various other websites, and have the following code: function post_cors(vars) { // cross domain AJAX posting - needs work to function in IE var successFunction = vars.success; var errorFunction = vars.error; var url = vars.url; var data = vars.data; if ($.browser.msie && window.XDomainRequest) { // CROSS DOMAIN AJAX FOR < IE10 (Doesn't work yet!) var xdr = new XDomainRequest(); xdr.open("POST", url); xdr.send(JSON

Make a CORS request in IE9 with cookies?

倾然丶 夕夏残阳落幕 提交于 2019-12-21 03:36:34
问题 In IE9, I am attempting to make a cross origin request with cookies. However, even when I have the Access-Control-Allow-Origin, Access-Control-Allow-Credentials, Access-Control-Allow-Methods all set to the appropriate values (the origin domain, true, and GET, POST), IE9 still isn't sending or setting cookies from the request. Here's the script I'm using: var xdr = new XDomainRequest() xdr.open("http://mydomain.com/cors.php") xdr.withCredentials = true; xdr.send(); Any idea on how to get

XDomainRequest aborts POST on IE 9

烈酒焚心 提交于 2019-12-18 16:56:54
问题 I am doing a cross domain Ajax call. My Code: if (window.XDomainRequest) // Check whether the browser supports XDR. { xdr = new XDomainRequest(); // Create a new XDR object. if (xdr) { xdr.timeout = 3000;//Set the timeout time to 3 second. xdr.onload = function () { alert("Success"); }; xdr.onerror = function () { alert("Error"); }; xdr.ontimeout = function () { alert("Error"); }; xdr.open("post", urlSearch); xdr.send(); } } else { $.ajax({ url: urlSearch, type: 'POST', dataType: 'json',

Setting headers in XDomainRequest or ActiveXObject('Microsoft.XMLHTTP')

纵然是瞬间 提交于 2019-12-18 05:35:09
问题 I'm trying to do something like this (W3 compliant, DOM): xhr.setRequestHeader( 'X-Requested-With', 'XMLHttpRequest' ); For ActiveXObject('Microsoft.XMLHTTP') and XDomainRequest (IE8). I'm having no such luck finding it anywhere in microsoft documentation or even google. Any idea how I can achieve this? 回答1: Referring to this post http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx See the point three 3. No custom headers may be

Cross-Site XmlHttp (XDomainRequest)

ぃ、小莉子 提交于 2019-12-13 17:11:50
问题 I'm writing a web-based tool for my company and it is running off the local intranet and running in IE8. I believe since the company computers are in a SOE, nobody has control over the browser settings except the IT department and they will be unlikely to make any changes, at least not in the timeframe we need it. I have an XmlHTTP request to a URL which is in "Trusted Sites" (also on the local intranet), but when I send the request, I get an exception: "Access is denied", and when I catch

Cross Domain Web Workers

六眼飞鱼酱① 提交于 2019-12-12 02:46:41
问题 I am aware that this question might be considered duplicate, but it is a new technology and I can not find a recent confirmation of my findings. I also think it potentially useful to have all the error messages in one place (feel free to add any other browsers). trying to loads a worker script from another domain: new Worker('http://otherdomain.co/worker.js'); I have set headers (using ModHeader Chrome Extension) to: Access-Control-Allow-Methods:* Access-Control-Allow-Origin:* But in Chrome I

CORS with jQuery and XDomainRequest in IE8/9

耗尽温柔 提交于 2019-12-11 10:31:01
问题 UPDATE: I highly recommend not investing any time in XDomainRequest, because it is a terribly poor implementation with many limitations. It basically only really works for GET requests to non-ssl servers, so you might as well use jsonp or whatever. I am using CORS to call a cross domain API, however Internet Explorer is giving issues. CORS should be possible in IE8 and IE9 through the XDomainRequest object, however I can't get things to work.. JQuery refuses to provide native support for

Backbone fetch() fails for IE

给你一囗甜甜゛ 提交于 2019-12-11 04:23:49
问题 I am using Backbone's fetch to get data from a remote server. It works fine for all browsers but IE (of course), as IE requires you to use XDomainRequest instead of XHR for cross site. Do I have to replace every fetch in the application with something like the below code? 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