By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,299 Members | 1,253 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,299 IT Pros & Developers. It's quick & easy.

set the parent window to close only if child window is closed

P: 3
I want my parent window to be able to close only if my child window is closed.
How can i check from the parent window whether the child window is closed or not?

please help
Jun 20 '07 #1
Share this Question
Share on Google+
3 Replies


acoder
Expert Mod 15k+
P: 16,027
When you open the child window, keep a reference to it, e.g.
Expand|Select|Wrap|Line Numbers
  1. var child = window.open(...);
To check if it's closed, you can try, e.g.
Expand|Select|Wrap|Line Numbers
  1. if (!child)
Jun 20 '07 #2

P: 3
When you open the child window, keep a reference to it, e.g.
Expand|Select|Wrap|Line Numbers
  1. var child = window.open(...);
To check if it's closed, you can try, e.g.
Expand|Select|Wrap|Line Numbers
  1. if (!child)

Thank u very much.It is working fine now
Jun 21 '07 #3

acoder
Expert Mod 15k+
P: 16,027
Thank u very much.It is working fine now
No problem at all. You're welcome!
Jun 21 '07 #4

Post your reply

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