Return to Snippet

Revision: 42707
at March 9, 2011 09:53 by anagaiyahoocom


Initial Code
$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);
}

Initial URL


Initial Description
Example of how to display HTTP error code and message on ajax response

Initial Title
Handling Ajax HTTP Error Response

Initial Tags
jquery

Initial Language
jQuery