$.ajax({
url: 'process.php',
type: 'POST',
data: 'passVarOne='+userName+'&passVarTwo='+emailAddress,
success:function(responseAnyNameHere) {
$('.responseArea').html(responseAnyNameHere);
},
statusCode:{
404:function(){
//$('.error').html("Page not found!");
alert( "file not found" );
}
}
}).done(function() {
alert( "success" );
}).fail(function() {
alert( "error" );
}).always(function() {
alert( "complete" );
});
Вот еще нашел код. Идея такая выполнить, прыгнуть в always и сделать редирект. Работает еще до fail