Click to See Complete Forum and Search --> : On closing a window a pop up should appear with out closing the parent window


bksaji
07-17-2003, 03:28 AM
Hello Members,
i need a help from yours, my problem is, when i am trying to close a window, a pop up window should appear with out closing its parent window. i have tried using the even 'onbeforeunload' but a dialog box is displayed whether you want to navigate or not, but i don't want that dialog box.
Here is the code which is taken from msdn collection:

<HTML>
<HEAD>
<SCRIPT>
function closeIt()
{
event.returnValue = "Any string value here forces a dialog box to \
appear before closing the window.";
}
</SCRIPT>
</HEAD>
<BODY onbeforeunload="closeIt()">
<a href="http://www.microsoft.com">Click here to navigate to
www.microsoft.com</a>
</BODY>
</HTML>

but my nesscity is to pop up a new window by clicking on the close button on the parent window and after that, from the pop up window(ie. the child window) if i click go to 'parent window' then it should go to the parent window by closing the pop up child window.

And if while using this coding, for every refresh and form submit or on any click on hyperlink this onbeforeunload is calling and i can't able to control it.

if any one have solution please help me.

thanks from bksaji