ext.ajax.request failure,extjs - Ext.Ajax.request() invokes the failure callback function upon succe...

I'm building a PhoneGap - Sencha-touch application for the iOS and Android platforms. I am loading a local .js file using the Ext.Ajax.request() function.

Funny thing happens - the requests succeeds, but the the 'failure' callback is called.

Here is the code:

Ext.Ajax.request({

url: 'localfolder/foo.js',

success : function(xhr){

// not invoked

},

failure : function(response, options){

// response.status == 0

// wtf, response.responseText contains exactly the contents of the local .js file!

}

});

Anyone has an Idea why the 'failure' callback is triggered when in fact the request succedded?

[edit]

More importantly, how do I make the 'success' callback to be triggered instead?