Identifying dataType returned when using jQuery
<p>Is it possible to identify what dataType is being returned by a page when using jQuery? Problem is, one page is a form which submits to user_verify.php. If the form does not contain errors the user_verify.php returns HTML and later redirects. If it finds errors, it returns json data (an array) which is sent to errorDivs. user_verify.php only does processing and does not contain any content headers etc. Any idea how something like this can be done?</p>

<pre><code>dataType: //Could be json, Could be HTML 
        url: "user_verify.php",
        success: function(data) {
            //If dataType == json //Form had error - do this
            //If dataType == HTML //Form was ok - say thanks and redirect
</code></pre>
