Let\'s say I have the following jQuery AJAX call:
$.ajax({ type: \"POST\", url: \"MyUrl\", data: \"val1=test\", success: function(result){
Doesn't the jQuery ajax function accept one more parameter at the end, a callback for failed calls? If so, just add a fail:function(...){..} after the success callback.
fail:function(...){..}