Processing
 

XDomainRequest does not work in ie8 & ie9

08/09/2016 09:22#1

Joined at: 4 months ago

Post: 1

Thank: 0

Thanked: 0

I browsed many times and I tried many times, I am totally feel upset myself kindly please help me. I tried to send request with cross domain in ie8 , but it did not go to server side.

I search & reffered and get many link, these are shows bellow

https://msdn.microsoft.com/en-us/library/cc288060(v=vs.85).aspx http://www.codeproject.com/Questions/708881/Cross-domain-ajax-response-with-IE-and-IE http://cypressnorth.com/programming/cross-domain-ajax-request-with-json-response-for-iefirefoxchrome-safari-jquery/

and manymore links

my code is show to below

<html lang="en"> <head>     <meta charset="utf-8"/>     <title>VAS</title>     <meta name="description" content="" />     <script src="/js/jquery-1.12.1.min.js" type="text/javascript"></script>     <script>     $(document).ready(function(){          (function(w) {         var g = {};         g.geoLocate = function(d, e) {              if ('XDomainRequest' in window && window.XDomainRequest !== null) {                  var xdr = new XDomainRequest();                 console.log("started");                 xdr.open("GET", "https://someDomain/?k=sometoken");                              xdr.onprogress = function(){                 console.log("ON progress");                 };                 xdr.onerror = function(){                 console.log("Error"); // i did not get here                 };                 xdr.onload = function(){                 console.log("onload function");// i did not get here                 };                 setTimeout(function(){                 xdr.send();                 },0);             }               // IE7 and lower can't do cross domain             else if (navigator.userAgent.indexOf('MSIE') != -1 &&                     parseInt(navigator.userAgent.match(/MSIE ([\d.]+)/)[1], 10) < 8) {             return "does not support";             }                  // Do normal jQuery AJAX for everything else                       else {             console.log("Else");                 $.ajax("https://someDomain/?k=sometoken", {                     contentType: 'application/json; charset="UTF-8"',                     crossDomain: true,                     dataType: "json",                     data: f,                     error: function(a, b, c) {                         console.log("Error"+a+b+c);                     },                     success: function(a, b, c)                     {                         console.log("Sucess"+a+b+c)                     },                     type: "GET",                     timeout: 10000                 });             }         };         w.idns = g         })(window);     });       </script>     </head> <body>     <div id="altContent">         <h1>VAS</h1>     </div> </body> </html> 

above shows ajax call or working fine with chrome and firefox browsers, but i need to run ie8 and ie9 browser, kindly help me please. and i used jquery.1.12.1

Similar articles

IE9 dosen't support my Button Tag

4 months ago - Reply: 0 - Views: 14

SSRS 2016 Web protal in IE8

4 months ago - Reply: 0 - Views: 13

how to handle @keyframes not supported by ie9?

4 months ago - Reply: 0 - Views: 5

Detect Windows XP in Firefox with JS

4 months ago - Reply: 1 - Views: 47

IE8 Not showing divs with floats

4 months ago - Reply: 2 - Views: 130

Including ECMA 5 script in IE8

5 months ago - Reply: 1 - Views: 98

XDomainRequest does not work in ie8 & ie9

5 months ago - Reply: 0 - Views: 10

How to minify angular.js?

5 months ago - Reply: 1 - Views: 30

VBA and IE8 - scrape text buried in table

5 months ago - Reply: 1 - Views: 37

Detect http satus IE10

5 months ago - Reply: 0 - Views: 6

how to compress angular.js?

5 months ago - Reply: 0 - Views: 3

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re