-
11 Dec 2012 2:28 AM #1
Answered: IE8 Ajax Request always fails
Answered: IE8 Ajax Request always fails
Hi all,
New to using Ext and have come across an issue with Ext Ajax requests and IE8. A very simple GET or POST request within IE8 always returns as a failure. However the same code returns success in firefox, safari and even GET requests work fine in IE9.
Is there anything I am missing? Below is my very simple Ajax request.
Any help would be much appreciated. Thanks in advance.Code:Ext.Ajax.request( { url: '/php/TestIEReq.php', method: "GET", success: function(response) { Ext.Msg.alert("GET Status","Request was successful"); }, failure: function(response) { Ext.Msg.alert("GET Status","Request was NOT successful"); } } );
-
Best Answer Posted by mitchellsimoens
Yes, you will likely need to use JsonP instead which does require a little server side setup but it's super simple in most cases.
-
12 Dec 2012 1:11 AM #2
Issue Found
Issue Found
Found the problem through testing other peoples IE Ajax examples. What I have found is that having Ext.Ajax.cors = true set in IE makes the AJAX requests not work properly.
Is this a bug in 4.1.1?
-
12 Dec 2012 2:36 PM #3Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
- Answers
- 3113
IE has no or bad support for CORS. IE10 should have much better support.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
13 Dec 2012 7:02 AM #4
thanks for the response, does this mean we should abandon CORS for ie8? many of my clients still use it unfortunately.
-
13 Dec 2012 7:13 AM #5Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
- Answers
- 3113
Yes, you will likely need to use JsonP instead which does require a little server side setup but it's super simple in most cases.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
14 Dec 2012 1:29 AM #6
thanks for the clarification mitchell. much appreciated


Reply With Quote