468,544 Members | 1,767 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,544 developers. It's quick & easy.

Closing Pop UP window automatically when Parent window is closed

nitindel
Hi
Guys...


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


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

Thanks
Feb 22 '08 #1
4 5031
acoder
16,027 Expert Mod 8TB
You can close the popup onunload with popup.close().
Feb 22 '08 #2
Hi
Guys...


I am looking for a functionality of closing the POP UP window that i have opened from a Parent window....Whenver 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..!!!
Expand|Select|Wrap|Line Numbers
  1.  var newwin=window.open();
  2.                 newwin.resizeTo(screen.width,screen.height);
  3.                 newwin.moveTo(0,0);
  4.                   newwin.close();
  5.  
  6.  
Feb 22 '08 #3
here is the code check it out..!!!
Expand|Select|Wrap|Line Numbers
  1.  var newwin=window.open();
  2.                 newwin.resizeTo(screen.width,screen.height);
  3.                 newwin.moveTo(0,0);
  4.                   newwin.close();
  5.  
  6.  
do this(newwin.close();)after the parent window.close() is executed
Feb 22 '08 #4
acoder
16,027 Expert Mod 8TB
do this(newwin.close();)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.
Feb 22 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Ron L | last post: by
1 post views Thread by Chris Bruce | last post: by
6 posts views Thread by Gary Miller | last post: by
6 posts views Thread by sramruttun | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.