var childWindow = null;
childWindow =window.open('child.html','Childwindow','status=0,toolbar=0,menubar=0,resizable=0,scrollbars=1,top=50 ,left=50,height=375,width=650');
if (!childWindow || childWindow.closed)
alert("Child window seems to be closed!");
// Here we get notification from child window. Here we can decide if the notification is
// raised because user close child window, or because user is playing with F5 key.
// NOTE: We can not trust on "onUnload" event of child window, because if user reload or refresh
// such window in fact he is not closing child. (However "onUnload" event is raised!)
Press bottom to open child window<br />
// Raise unload notification to parent window
Body of the child window<br />
- Do not use polling.
- Recognize if child window is closed or is been updated by user .
- Found on IE and Mozilla Firefox.
Thanks & Regards,
SMTS || Microsoft Technology Practice - Bridgestone -
There's a catch in this. If you are using any pop-up blockers for the browser, then it might create problems. I was using Google Toolbar(which had the Popup-blocker in it) and it was not allowing the Notification to be send the parent!