Is there a way to catch HTTP 4xx and 5xx errors occuring in an IFRAME?
I want to replace the blue and white tomcat error pages, with a small
discrete text saying "The page currently not available".
The browser in question is Mozilla 1.3.1. But it would be nice if the
solution also worked in Opera 7.x, and IE 5.x and 6.x.
I know that setting an onError function on the IFRAME doesn't work,
both because [1]*says that it only works for JavaScript errors and not
for browser errors, and because I've tried it.
Searches on http://groups.google.com found me two threads about this
problem ([2], [3]), but no solutions that I could see.
One approach I could think about, is to set an onLoad function on the
frame, and check the load status code. Is the load status code
available on the frame? (One future problem here, is that I've heard
rumours about Opera having problems with onLoad)
Are there other possible solutions?
Thanx!
- Steinar
References:
[1] <URL:http://www.devguru.com/Technologies/...n_onerror.html >
[2] <URL:http://groups.google.com/groups?hl=n...8%26oe%3Dutf-8 >
[3] <URL:http://groups.google.com/groups?hl=n...8%26oe%3Dutf-8 >