...

View Full Version : new small window when browser is closing



joonstar
04-29-2004, 12:00 AM
I like to make a new small pop winodw when user close the browser.

Can I do it with your help?

Jason
04-29-2004, 12:34 AM
what kind of pop window? is it a popup or is it an alert? there is a method called onclose that will allow you to run a command when the window is closed...


Jason

joonstar
04-29-2004, 12:37 AM
I meant webpage, not alert.

glenngv
04-29-2004, 03:01 AM
what kind of pop window? is it a popup or is it an alert? there is a method called onclose that will allow you to run a command when the window is closed...
There is no onclose event. Maybe you meant onunload, but that doesn't distinguish change of url, reload, and window close. There is a trick (http://www.codingforums.com/showthread.php?t=37279) on that though but unfortunately, it's IE only. Also there have been many discussions (http://www.codingforums.com/search.php?searchid=14095) on this topic, you may want to read them.

Roy Sinclair
04-29-2004, 03:23 PM
Personally, if I close a browser window it means I'm done and I don't want another window popping up. That would be especially true if the next window also pops up yet another window. The only possible use I can see for what you asked for is to be annoying though I'm fairly certain that isn't your intention. Perhaps you need to think about why you want this some more and maybe an alternative solution will present itself.

joonstar
04-29-2004, 11:37 PM
I use session for confirming login or not login.

these days I found the session is still alive although the browser is closed.
If another user use the same computer, he can see the personal data of the former logged in user's.

I can make log out option to a button.
But I can't handle whether the user close the browser or not.

So I like to check it.

When a logged in user close the browser without logout,
I like to make a new small window hidden, and kill the session by the hidden window, and make the hidden window disappear automatically.

This is why I am looking for the new small window code...

glenngv
04-30-2004, 03:02 AM
When the browser window (as well as its associated windows) is closed, the session variables are not abandoned immediately but it will be once the session timeout expires (20 mins by default). When another user logs in within that span of time, the server assigns a different session id, so he has no access to the session variables of the previous user. That's why I don't believe in the statement highlighted:


these days I found the session is still alive although the browser is closed.
If another user use the same computer, he can see the personal data of the former logged in user's.

Actually, this topic has been discussed extensively before. See this old thread (http://www.codingforums.com/showthread.php?t=980)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum