I have to modify a project written by someone else. Because the code is a mess I can\'t really change this $.post() (or replace it by $.ajax()). What I need to do, is to know if
You can use $.ajax() ($.post is a shortcut that ends up calling it anyway), and define the error callback.
$.ajax()
$.post
Or, if you really do not want to do that, call
$.ajaxError(function(){ //error handler })
before that $.post