Is there any way I can close the dhtml window from the page loaded within the iframe?
Return to Recent Questions
Q:
I need to use an iframe within the popup window.
Is there any way I can close the dhtml window from the page loaded within the iframe?
A:
You can close the popup using the following function:
document.getElementById('win').hide();
Unfortunately it won't work if you use iframe as window content.
You open another page in the popup (in Iframe) so you cannot access
document.getElementById('win').hide();
element which is situated on the first page.
When you use text or object_id as window content the content of the popup will be situated
on the same page so you can access document.getElementById('win') element and hide it.
There is a workaround.
Use text as content type and add the following code inside popup:
<a onclick="document.getElementById('win').hide();">...</a><iframe></iframe>
Your link will work in that case.
Return to Recent Questions
Related:
- Sep 04, 2006 - Set a menu item to pressed when a page is loaded.
- Sep 17, 2006 - How can your javascript onmouseover menu be set to open by click?
- Sep 18, 2006 - Does the js menu work to load pages into an iframe?
- Oct 15, 2006 - Submenus doesn't position correctly in my javascript template.
- Nov 13, 2006 - Can I use Hebrew in the script menu easily?
- Nov 17, 2006 - How can I open a new window of a specific dimension in the dhtml toolbar?
- Dec 01, 2006 - Why flyout menu does not float and why I cannot centre the menu?
- Dec 04, 2006 - With the licensed .js files of menu dhtml the status bar on IE shows "Error on page".
- Dec 14, 2006 - How to use a dhtml javascript menu item so that it opens a window at a certain size?
- Dec 19, 2006 - Why submenu css pop-down not OVER the other object (frame)?
- Jan 05, 2007 - In Delux Tuner I can not find how to make menus multi-level or multi-column
|