JQuery error option in $.ajax utility

I find the request more useful than the error.

error:function(xhr,err){
    alert("readyState: "+xhr.readyState+"\nstatus: "+xhr.status);
    alert("responseText: "+xhr.responseText);
}

xhr is XmlHttpRequest.
readyState values are 1:loading, 2:loaded, 3:interactive, 4:complete.
status is the HTTP status number, i.e. 404: not found, 500: server error, 200: ok.
responseText is the response from the server – this could be text or JSON from the web service, or HTML from the web server.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)