Jump to content

Cross-Domain Jquery Ajax - Problem In Ms Ie


damian1923

Recommended Posts

I need send data between 2 domains:

 

 

 

in domain1 (JQuery):

 

   //e.g. data = "name="+$name+"&email="+$email;
   $.ajax({
 crossDomain : true,
 type: "POST",
 data: data,
    url: "domain2.com",
 success: function(html){
  console.log('GTRS success!');
 }
   });

 

 

in domain2 (PHP):

 

 

<?php
 header("Access-Control-Allow-Methods: GET, POST, OPTIONS");
 header("Access-Control-Allow-Credentials: true");
 header("Access-Control-Allow-Origin: *");
 header("Access-Control-Allow-Headers: Content-Type, * ");
// and my code
?>

 

It work very well in all browsers excerpt MS IE,

how to fix this problem?

any idea?

What version of MSIE are you trying to use? It is completely possible that the version of MSIE you are using simply doesn't support cross-domain ajax. I can't give you a definitive answer on the subject as my experience is fairly limited on the subject, but I'm betting that someone who knows more will probably be along later to say something about how Microsoft is very anti-standard compliant and when all the other browsers are embracing new technologies and standards Microsoft runs and hides from them and invents their own alternative. Okay, yes I am a little (a lot) anti-Microsoft when it comes to internet technologies, but I can tell you that I use cross-domain ajax on a project and it does work in IE10 on Windows 8. If I have done nothing else, perhaps that little tid bit will give you some glimmer of hope that your issue can be resolved. If I come across anything useful in my random googling of ajax/html/css queries, I'll get you some hopefully more useful information. Some people watch TV or play video games when they are bored; I play google roulette.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.