Hello,
I need some help with finding out the status of an iframe.
In the web-app we are writing, we have an iframe that displays PDF documents (i.e src="document?contractNumber=234&docId=567"). The
servlet mapped to by "document" uses the query parameters to get the document and stream it's contents to the response, with the ""application/pdf" Content-Type header. The rest of the page includes navigation controls which change the src of the iframe.
Now a few things can go wrong here - the document might not be found for whatever reason, the user's session might be expired, and other stuff like server errors. Is it possible to determine the status code of the iframe's content (200, 401, 404, 500, whatever) with javascript?
Thank you,
Yuriy