How do I get hold of the response from a (non-ajax) image request.
Using jQuery I’m doing:
$('#myimg').error(function(err) {
console.error(err);
}
However this err object doesnt have the response sent from the server. I can view the error response in chrome dev tools.. and it is the expected response for this error, but how do I access that message from javascript/jquery?
i dont think there is a way to do that
what you can do instead is make an ajax call when ever error event is raised
and you will get the response in the error handler of the
ajaxcall