Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.