/ Published in: jQuery

Example of how to display HTTP error code and message on ajax response
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$j.ajax({url: req, type: "POST", dataType: "json", data: "image=" + image + "&lbox=" + lboxVal, success: good_response, error: error_response}); function error_response(xhr,status) { //display http error and message from xhr object alert('HTTP ' + xhr.status + ' Error Encountered: ' + xhr.statusText); }
Comments
