How to call "session.abandon" when the user closes

Results 1 to 3 of 3

Thread: How to call "session.abandon" when the user closes

  1. #1
    Henrique Guest

    Default How to call "session.abandon" when the user closes

    I have a chat app in ASP and i need this code because if the user closes the chat window without pressing the "exit" button his name remains as a online user until the session ends (20 mins!!!).<BR>I tought in putting an ONUNLOAD event on the chat window that opens another window with the "session.abandon" code in it, but i&#039;m not sure if it works because sometimes when you open another window you actually creates another session.<BR><BR>thanks for your time

  2. #2
    Join Date
    Dec 1969

    Default RE: How to call

    There is no foolproof way to do what you describe the way you are doing it. The best method is to have the conversation window check for the user on refresh. If they don&#039;t get a refresh for say 20 seconds it&#039;s a fair bet they have left and then remove them from the Who&#039;s here list.

  3. #3
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: How to call

    Well you can try a hidden frame. In the unload even of that frame call the session.abandon

Posting Permissions

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