Popup window

Results 1 to 2 of 2

Thread: Popup window

  1. #1
    Join Date
    Dec 1969

    Default Popup window

    Hi,<BR> I am able to get a popup window from my asp on click or onmouse over events through Java Script. But the popup window is totally independent of the parent window. ie., when I close <BR>the parent window, the popup window is still opened and user needs to be close it seperately. We require a solution where in as soon as we close the parent window (or the page), all corresponding popup windows which were opened should also be closed.<BR>Also we require a solution, where in as we move from the main page to other pages, all popup windows corresponding to the main page should be closed automatically.An earlier solution of this problem is very much appreciable.<BR>If possible, please mail the solution to vankireddy5@rediffmail.com<BR><BR>Thanks,<BR>Amar

  2. #2
    Join Date
    Dec 1969

    Default RE: Popup window

    Maybe use...<BR><BR>popwin1 = window.open("mypopup1.htm", "Popup1", "menubar, scrollbars, height = 400");<BR><BR>...to open each of your popup windows (changing the variable names).<BR><BR>Then (again in your calling page) use...<BR><BR>&#060;HEAD&#062;<BR>...<BR>&#060;SCR IPT&#062;<BR>function closePopups() {<BR> if (popwin1&&popwin1.open) popwin1.close;<BR> if (popwin2&&popwin2.open) popwin2.close;<BR> if (popwin3&&popwin3.open) popwin3.close;<BR> if (popwin4&&popwin4.open) popwin4.close;<BR>}<BR>&#060;/SCRIPT&#062;<BR>&#060;/HEAD&#062;<BR>...<BR>&#060;BODY .. ONUNLOAD="closePopups();"&#062;<BR>...<BR><BR>This will close all popup windows when the page changes or closes. If you don&#039;t always want to do it when the page changes then you&#039;ll have to use a frameset container with the ONUNLOAD event on the frameset and call the window.open()s for the popups from a function within the frameset page.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts