SunQuest
           ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old July 17th, 2003, 06:03 AM
bksaji bksaji is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 6 bksaji User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old July 17th, 2003, 06:35 AM
Agarash Agarash is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: South Africa
Posts: 53 Agarash User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 35 sec
Reputation Power: 6
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"); }

Reply With Quote
  #3  
Old July 17th, 2003, 08:32 AM
bksaji bksaji is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 6 bksaji User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > On closing a window a pop up should appear with out closing the parent window


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway