Updata table if user browser window close

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kirubagari
    New Member
    • Jun 2007
    • 158

    #1

    Updata table if user browser window close

    Hi,

    If any of thw browser window closed,how to make sure that user logout from the system.
    I will update a table if user logout from my system.
    If user close any of the browser window,how to make sure that i update the table?Please help
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Use the before unload event. Just be aware that this traps whenever a user leaves a page for any reason, not just when it's closed. You can use a variable to track and ignore those other reasons if you want.

    Comment

    • kirubagari
      New Member
      • Jun 2007
      • 158

      #3
      Hi,
      Thanks.
      Should we do this in everypage?
      Auto Logout when the application browser closed.I have logout form.I will update table when user logout from the system.
      Is it any other way than include in all the form ,if application browser closed,update the table.
      Please help
      Thanks

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        I just reread the question. If you're trying to log them out, you should probably use a session for this instead of trying to trap events.

        Comment

        Working...