8

I'm making a standard JQuery .ajax call, already jumped through hoops to get it working in other browsers but now I'm just stuck on IE9 (and lower, I'm sure). The page canada.example.com/registration contains a registration form, which is submitted using JQuery's .ajax:

jQuery.ajax({
    url: 'http://canada.example.com/registration.php',
    type: 'POST'
});

Note the POST request is made to http://canada.example.com/registration.php, so I'm not making a cross-site request.

This now works in Firefox and Chrome, but IE9 returns a "No transport" error like it didn't try to make the request. Any ideas on how to fix this? I've gone to some lengths to try and make this not a cross-origin request, but IE 9 still seems to think it is.

outis
  • 75,655
  • 22
  • 151
  • 221
Tom Redman
  • 5,592
  • 4
  • 34
  • 42
  • Fixed it. I was passing in the fully qualified URL, i.e., http://canada.example.com/registration.php instead of just registration.php and also had the cross-domain flag set to yes. I removed the fully quality name so it's just sent to "registration.php" and set the cross-domain flag to NO and it works. – Tom Redman Dec 03 '11 at 18:18
  • Can you write your comment as an answer and mark it as the accepted answer? – Ivan Dec 03 '11 at 20:34
  • Possibly dup of [jQuery Call to WebService returns “No Transport” error](http://stackoverflow.com/q/5241088/90527), but that question isn't stated clear enough to tell. – outis Mar 30 '12 at 21:35

1 Answers1

7

Fixed it. I was passing in the fully qualified URL, i.e., canada.example.com/registration.php instead of just registration.php and also had the cross-domain flag set to yes. I removed the fully quality name so it's just sent to "registration.php" and set the cross-domain flag to NO and it works.

jQuery.ajax({
    url: '/registration.php',
    type: 'POST',
    crossDomain: false
});
outis
  • 75,655
  • 22
  • 151
  • 221
Tom Redman
  • 5,592
  • 4
  • 34
  • 42