views:

218

answers:

1

Hi All,

I have a JSP page which includes an iframe , Iframe contains the image display part & some other part, The problme is whenevr the iframe encounters an error, it gets redirected to error page (Error page is defined for the JSP) but not the whole page, only the iframe conained part of the page displays an error, I want the whole page to move to error page. I checked few forums but didn't find any solution. Thanks you very much

Rohit Desai

A: 

If the contents of the iFrame are under your control you can make the a custom error page that includes logic to change the parent frame but this will only work if the page in the iFrame and the parent page are on the same domain.

Jeff Beck
Hi , Thank you very much for the reply. I found the solution by adding following tag on my error page. if(came from iframe){ window.top.document.location.href = "error.jsp"}Thanks,Rohit.
Rohit Desai
No problem glad I could help.
Jeff Beck