Please help! I’ve [color=red]popup[/color][b]2[/b] difference windows named [color=red][b]“main”[/b][/color] and [color=red][b]“menu”[/b][/color] And I’ve to creat a link at [color=red][b]“menu”[/b][/color] to [b]close both popup windows[/b]…? Could anyone help me!??? Thanks!
@GollumSep 03.2003 — #As always there are many ways to skin a cat, here's one...
I'm guessing that your two popups are created by code in your main page with something like the following... <i> </i> var oMain = window.open("Main.html", "", "main"); var oMenu = window.open("Menu.html", "", "menu");
Now, if you want one window (i.e. Menu) to be able to close the other (Main), then you will need to let it now how to make contact. Something like this should do... <i> </i> oMenu.oMain = oMain;
Then in your Menu.html code you could have something like: <i> </i><button onclick="window.oMain.close(); window.close();">Close both windows</button>