jeroenooms
1 Jun 2010, 1:09 AM
I noticed that when using an ajax request with parameter isUpload: true (hence actually using the hidden iFrame method), the call is always successful, even when the request actually fails. For example, if you post a form to an non existing location, and hence get a 404, the success callback is still fired, and not the failure callback:
Ext.Ajax.request({
form: 'uploadform',
isUpload: true,
url: '/sdfdsfsd/sdfsdfds/sdffsd',
success: function(x) {alert('success')},
failure: function(x) {alert('failure')},
callback: function(x) {alert('callback')}
});
I'm not sure if this is a bug in Ext or just a limitation of the hidden iFrame method, but it might be worth documenting this under the 'isUpload' option in the Ajax.request manual page.
Ext.Ajax.request({
form: 'uploadform',
isUpload: true,
url: '/sdfdsfsd/sdfsdfds/sdffsd',
success: function(x) {alert('success')},
failure: function(x) {alert('failure')},
callback: function(x) {alert('callback')}
});
I'm not sure if this is a bug in Ext or just a limitation of the hidden iFrame method, but it might be worth documenting this under the 'isUpload' option in the Ajax.request manual page.