Treating a PHP error while waiting for JSON response with jQuery AJAX : <p>I have to send a form through jQuery AJAX, retrieve the JSON response and check if for example data.name and data.email are "success" to get the user to know his form was submitted.</p>

<p>But when there is a PHP error for example and there is no JSON response. what's the best way to get that, as the callback message will be "Sending..." forever while there is a response telling that there is a PHP error.</p>
