Closing Pop UP window automatically when Parent window is closed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nitindel
    New Member
    • Dec 2007
    • 67

    Closing Pop UP window automatically when Parent window is closed

    Hi
    Guys...


    I am looking for a functionality of closing the POP UP window that i have opened from a Parent window....Whenv er i Close the Parent window..


    I mean to say...
    Whenver i close the parent window ..the pop up shold also be closed automaticallly. ..

    Thanks
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    You can close the popup onunload with popup.close().

    Comment

    • raveendrabikkina
      New Member
      • Feb 2008
      • 26

      #3
      Originally posted by nitindel
      Hi
      Guys...


      I am looking for a functionality of closing the POP UP window that i have opened from a Parent window....Whenv er i Close the Parent window..


      I mean to say...
      Whenver i close the parent window ..the pop up shold also be closed automaticallly. ..

      Thanks
      here is the code check it out..!!!
      Code:
       var newwin=window.open();
      				newwin.resizeTo(screen.width,screen.height);
                      newwin.moveTo(0,0);
      			      newwin.close();

      Comment

      • raveendrabikkina
        New Member
        • Feb 2008
        • 26

        #4
        Originally posted by raveendrabikkin a
        here is the code check it out..!!!
        Code:
         var newwin=window.open();
        				newwin.resizeTo(screen.width,screen.height);
                        newwin.moveTo(0,0);
        			      newwin.close();
        do this(newwin.clo se();)after the parent window.close() is executed

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          Originally posted by raveendrabikkin a
          do this(newwin.clo se();)after the parent window.close() is executed
          If it's after, the window will already be closed.

          Anyway, that still doesn't allow for closing the browser manually.

          Comment

          Working...