$(document).bind('ajaxError', function(event, request, settings, error){ alert(request.responseText); } );