Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts

    new small window when browser is closing

    I like to make a new small pop winodw when user close the browser.

    Can I do it with your help?
    Get my greedy up

  • #2
    Regular Coder
    Join Date
    Feb 2003
    Location
    California
    Posts
    925
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #3
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I meant webpage, not alert.
    Get my greedy up

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,968
    Thanks
    0
    Thanked 236 Times in 233 Posts
    Quote Originally Posted by Jason
    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 on that though but unfortunately, it's IE only. Also there have been many discussions on this topic, you may want to read them.

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #6
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...
    Get my greedy up

  • #7
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,968
    Thanks
    0
    Thanked 236 Times in 233 Posts

    I'm assuming you're using ASP.

    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •