iframe 404

Page: 1

Author Post
mwehrly
Guest
Sorry if this has been addressed before, I tried searching but I was unable to find anything.

What I would like to do is specify a custom 404 page or a standard "Unavailable" message when the iframe load returns a 404 error rather than loading the current web 404 page.

This functionality is available for the ajax request, but not for the iframe. Is this possible? Thanks in advance.
Administrator
Registered: Aug 2008
Posts: 3382
I think the only way to do this is to first check with the ajax call you alluded to. That is, request just the page headers via ajax (to keep the return data small) and see if you get a response. If you do, go ahead and load the iframe. If not, load your 404 page. I don't know of anything you can do in this regard using just the iframe fetch conversation.
mwehrly
Guest
Thanks for sending me in the right direction on this. Much appreciated as I am new to javascript. Thanks again.

Matt

Page: 1