success function is not called at all when I receiver error code 400:
success: function() {
alert("success");
},
error: function() {
alert("error");
},
complete: function() {
alert("complete");
}
None of those are called, and I don't get javascript errors in
console...
On Jan 18, 6:23 pm, Nathan Klatt <[email protected]> wrote:
> On Mon, Jan 18, 2010 at 11:05 AM, anton <[email protected]> wrote:
> > Can't seem to get any response from an ajax call which response is 400
> > Bad Request
>
> > $.ajax({
> > url: url
> > type: "GET",
> > dataType: "json",
> > success: aj.dataLoaded,
> > error: function() {
> > alert("error");
> > },
> > complete: function() {
> > alert("complete");
> > }
> > });
>
> > When server responds with error code 400 neither the error function
> > nor the complete function is called, any tips on how to correct this?
>
> What is aj.dataLoaded doing? I believe a 400 will go to the success
> callback; after that finishes (assuming it does so :) it should call
> the complete callback. Can the call to complete be disabled by
> returning false from the success/error callback?
>
> Nathan