Results 1 to 2 of 2

Thread: browser events

  1. #1
    Sencha User
    Join Date
    Mar 2007
    Posts
    102
    Vote Rating
    0
      0  

    Default browser events

    Hi,

    I have created a logon page where user enters username and password and logs on to website.

    1) What I need is if user clicks browser's corss button after logging an alert should appear conforming from user that if he wants to close window. If user clicks yes then user should be logged off.

    2) Similar behaviour is needed when user logs on and then click browser's back button .


    How can I achieve this. I have been looking for javascript code but to no benefit.


    Waiting for your response.


    Thanks.

  2. #2
    Ext User
    Join Date
    Sep 2007
    Posts
    11
    Vote Rating
    0
      0  

    Smile

    window.onbeforeunload = your.fn
    window.onunload = your.fn

Posting Permissions

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