-
3 Sep 2012 9:46 PM #1
Answered: How to handle "HTTP Error 302" in Extjs & PHP?
Answered: How to handle "HTTP Error 302" in Extjs & PHP?
Hi All,
I am occasional getting HTTP Error 302 (because of session getting expired).
I want to handle this error by means of redirecting into index.php.
Can somebody guide me how to handle that?
-
Best Answer Posted by tvanzoelen
Is 302 an error? I think its a redirection that will serve a file.
To handle http requestexceptions
Code:Ext.Ajax.on('requestexception',function(con, response, options){ //your code here });
-
4 Sep 2012 12:08 AM #2Ext JS Premium Member
- Join Date
- Apr 2008
- Location
- Groningen - Netherlands
- Posts
- 1,017
- Vote Rating
- 23
- Answers
- 75
Is 302 an error? I think its a redirection that will serve a file.
To handle http requestexceptions
Code:Ext.Ajax.on('requestexception',function(con, response, options){ //your code here });
-
4 Sep 2012 11:05 PM #3Sencha - Community Support Team
- Join Date
- May 2012
- Location
- Istanbul
- Posts
- 1,331
- Vote Rating
- 76
- Answers
- 124
HI!
try requestexceptions or you may also handle it during your ajax request,
sample:-
Code:Ext.Ajax.request ( { url: 'Your URL', success: function ( f, a ) { // Success Function }, failure: function ( f, a ) { if ( a.response.status == 302) { alert('302 redirection error') } } });sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.


Reply With Quote