Reputation: 1034
Hi everyone I am using PhoneGap 1.5.0 with jQuery 1.6.4 and jQuery Mobile 1.0.1 and am trying to do a simple ajax call for an xml file. It all works well on success but if I change the URL or the credentials to invalid values the error method is not called.
$
.ajax({
url : "url be here",
dataType : "xml",
contentType : 'application/xml',
username : username,
password : password,
success : function(xmlData, textStatus, xhr) {
//this is triggered on success
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
//this is never called
}
});
I can't figure out, what I am doing wrong here. :(
Upvotes: 0
Views: 572
Reputation: 148524
change the error function signature to :
function( jqXHR, error_textStatus, errorThrown)
Upvotes: 1