PDA

View Full Version : Picking up the browser back button


IBrewster
08-12-2002, 01:20 PM
I'm looking to write a script that will run when the browser back button has been clicked. I don't seem to be able to find an event that will do this for me (either in IE or NS)

Anyone help me?

TIA

Ian

mordred
08-12-2002, 01:30 PM
I believe the closest you get is onunload, only that this event fires when you load another document into the window or close it completely. IE has also onbeforeunload, which gives you a little more control over the event firing.

But AFAIK there is no such event like "onbackbuttonclicked", the browser controls (like opening the bookmarks, clicking the search button etc.) are usually beyond the scope of javascript.