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 18, 2006 - Does the js menu work to load pages into an iframe?
- Nov 17, 2006 - How can I open a new window of a specific dimension in the dhtml toolbar?
- 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?
- Jan 08, 2007 - Do you have a list of which browsers that your dhtml floating window is compatible with?
- Jan 18, 2007 - Will this dhtml context menu rollout from within an iframe over a regular frame
- Feb 11, 2007 - Is it possible for the dhtml sliding menu to highlight selected item on the page?
- Feb 24, 2007 - I built the dhtml pulldown menu and tried it in my site and I see nothing but text
- March 12, 2007 - I have an errors on the dhtml hover menu in HTML application with 4 iframes.
- June 08, 2007 - At the first time arrow images are loaded successfully in the dhtml image menu...
|