|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
On closing a window a pop up should appear with out closing the parent window
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 |
|
#2
|
|||
|
|||
|
i only browsed through the question, but i think this might work:
1. create a HTML page (page 1) popup page the way you want, no navigation bar or size or whatever. now if i understand correctly, you want to go to this page 1 you just created if the user wants to close the main page right?? 2. so in the main page put this code: <body onunload="javascript:logout()"> where the function logout looks something like this: function logout () { window.open("page1.html"); } |
|
#3
|
|||
|
|||
|
Dear Agarash,
Thank you for your replay, Actually my need open a new window with out closing the old window but from your replay, while page1.html is opening(popup window) then the main page(ie., the parent window) will be closed, but it should be closed. thanks from bksaji |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > On closing a window a pop up should appear with out closing the parent window |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|