Log in

View Full Version : How to open div popup on parent iframe???



ejigarpatel
07-14-2010, 01:25 PM
Hi,
I have created one tool. In which I want to show result in DIV popup. I have use “fancybox” to show it.
It’s working fine: http://dev.ir2.flife.de/data/test/hpl.php
Select HTML in Select format drop down and then click on “Show Data”.

But if I have to put this tools as iframe in some page like: http://dev.ir2.flife.de/data/test/test.html
So here when I click on “Show Data”. It will show inside iframe only.
Is there any way to show it outside of iframe and in main page?

djr33
07-14-2010, 04:25 PM
Due to security restrictions in browsers, it is not really possible to do anything outside of the iframe.
One option is not using iframes-- maybe you could use ajax instead. Then it might work.

You could also try to communicate between the two windows, maybe with a cookie, or using "parent", but I don't know how well this would work.

The simple answer is: if you open a window within the firame it will always be within the iframe. If you open it on the main page, it can go anywhere.