Forum Moderators: open

Message Too Old, No Replies

Which Event Fires When 'Back' Button is Pressed to Return to an Anchor

         

premasagar

12:15 pm on Aug 18, 2006 (gmt 0)

10+ Year Member



A search gave me no clues...

I'd like to know what is the event that fires when a user clicks 'Back' on their browser to return to a different anchor on the same page?

To clarify, imagine this scenario:

1) User opens 'mypage.htm' (the 'load' event fires)

2) User clicks on a link internal to the page: 'mypage.htm#anchor1'.
Q1: Does an event fire here? Which one?

3) User clicks on another internal link, to 'mypage.htm#anchor2'.

4) User clicks 'back' button, to return to 'mypage.htm#anchor1'.
Q2: Does an event fire here? Which one?

5) User clicks 'back' button again, to return to 'mypage.htm'.
Q3: Does an event fire here? Which one?

The answers to all three questions may be identical - but I ask 3 times in case there is a difference.

I'm very grateful for any insight.
Thanks,
Premasagar.

premasagar

2:07 pm on Aug 20, 2006 (gmt 0)

10+ Year Member



Hmmm... no comments. Perhaps that is because this is not strictly a JavaScript query - although the reason I asked it in this forum is because I am using JavaScript to try to capture the event.

I have reposted again [webmasterworld.com] to the HTML/Browsers forum. Thank you!