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.
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
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With