SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Confirmed Halfwit
    Join Date
    Oct 1999
    Location
    Vancouver, BC, Canada
    Posts
    983
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Execute function when back button is clicked?

    Does anyone know how to execute a function when the "Back" button is clicked?

    Thanks.

  2. #2
    SitePoint Guru okrogius's Avatar
    Join Date
    Mar 2002
    Location
    US
    Posts
    622
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The closest thing you can do is call a function on a page exit, but there is no way to detect that a back button was used specifically.

  3. #3
    SitePoint Member
    Join Date
    Nov 2002
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i agree. its not very possible to detect the use of a "back" button. the OnUnLoad event is triggered when the document/page is unloaded - could be from back button, forward button, closing the window, user goes to new url, users clicks link...

    javascript is quite limited in that respect, unfortunately.


Bookmarks

Posting Permissions

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