I need to run a javascript whenever a toolbar event happened except for the back button in the onbeforeunload. any idea how to recognize the event was caused by a back button?
Unless browsers expose toolbar events to the document (which AFAIK, none do - after all, why should they?), I don't think you would be able to do this.
There is no way that you can tell if a page was reached by the back button, or some other action. You can guess using a few clues such as the referrer, but you can never be 100% sure.
Dan
[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
Thanks. Is there a way to tell what the next screen to be loaded is during the onbeforeunload event? if so maybe I could determine that the domain is different from the history.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.