Redirecting on closing window

Discussion in 'JavaScript' started by promotingspace.net, Feb 1, 2011.

  1. #1
    Hi
    I record the time of login and logout of users on my site
    The problem is when users close the window before logging out, the log out time is not recorded?
    Has anyone a solution for this?

    For example is it possible to redirect to the logout page if the close button is clicked?

    Thank you in advance for your help
     
    promotingspace.net, Feb 1, 2011 IP
  2. srisen2

    srisen2 Peon

    Messages:
    359
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    yes you should be able to process a window change

    window.location = 'http://www.yourdomain.com'
     
    srisen2, Feb 1, 2011 IP
  3. darcy

    darcy Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    please return false after call window.location method on ie6
     
    darcy, Feb 8, 2011 IP