Hello, I am getting json data from my server to show them as a table.
$('#queryFrom').ajaxForm({
dataType: 'json',
beforeSubmit: showRequest, // pre-submit callback
success: processJson,
error: function (xhr, ajaxOptions, thrownError){
$('#queryResult').html('<div class="ui-corner-all ui-state-error"><p><span class="ui-icon ui-icon-alert"></span>'+thrownError+'</p></div>');
$('#queryResult').show("slow");
}
});
Can I somehow separate the mysql errors from json/ajax erros side? Currently I am getting :Invalid JSON: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'simover.simulation' doesn't exist{} Can I customise the messages thrown by jquery? thanks Arman.
EDIT
one can use xhr.responceTxt instead of thrownError.