maya90 — 2010-08-03T15:51:58-04:00 — #1
after hitting 'back' button I'm taken to spot on page where I was, but I'm being asked to do the opposite -- take user to the top of the page, after hitting 'back' button...
when I look up this issue, most people complain of the opposite - that the browser takes them to to top of the page after hitting 'back' button...;-)
maya90 — 2010-08-12T11:19:55-04:00 — #2
yeah, I thought so.. it's just that I was asked to do this at work and wanted to be 100% that it was undoable when I told them.. thank you..
alexdawson — 2010-08-12T10:59:17-04:00 — #3
Not that I'm aware of, most browsers don't trigger a refresh when you use the navigation buttons so even if you had a script, there's no effective way to detect that the back button was clicked and that the action you want should be undertaken. The only way I can think of which may be able to do the trick is to give links the anchor fragment # (so like index.html#) thereby the browser "should" see that it needs to go to a section of the page and as there's no fragment identified it should jump to the top of every page by default. Hopefully that might work, but otherwise you're probably out of luck in this case.
maya90 — 2010-08-03T15:53:31-04:00 — #4
oops.. in that last sentence meant: