I have an jQuery ajax function that responds with HTML in the call fails. If the call is successful it responds with JSON: `{"result":true}`

```
    $.ajax({
        type: 'POST',
        dataType: 'html',
        success: function (response) {
            if (response.RESULT === true) {
                window.location.replace(baseUrl);
            } // else do something else and show errors
        }
    });

```

Firefox will not recognize the result in JSON, however, since the dataType is set to 'html'. I tried leaving it blank, and that didn't work. Is there a work around, or is it bad pratice to return two things?

It's for a registration form. I'm returning HTML because it's easier to show the user validation (server side) errors, while if the registration is successful I redirect them.