View Full Version : Close the Dialog From the IFrame using 'onload'
khrysller
08-23-2007, 12:41 PM
Hi : )
I am trying to close a generated Dialog, but I am inside a IFrame. There is some possibility to do this?
I am using the current HTML:
[CODE] <div id="hello-dlg" style="visibility:hidden;position:absolute;top:0px;">
<div class="x-dlg-hd">Aus
artythesmarty
08-23-2007, 05:15 PM
I BELIEVE (you'll need to test this), but you can do it simply by accessing the parent property of the iframe window, which is: window.parent. So, once you have the right document in the Dom, you should have access to those Javascript commands. [window.parent.dialog.hide()]. I know I've done this in an app before so with a little playing it should work. However, I will say that in my app I ran into problems essentially "running" server-side code with an IFRAME and then exiting out. But I would never be one to say to absolutely not do something a certain way (when it comes to design). If it works, it works. Good luck.
-Matt
I guess this would help:
http://extjs.com/forum/showthread.php?t=11110&highlight=iframe
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.