Click to See Complete Forum and Search --> : commandeer browser back button?


tom_f
01-24-2003, 02:45 PM
Any number of pages (A1,,,Ai) link to page B which is just a redirect page transfering to one of a number of pages (C1,,,Cj).

Clicking the browser's back button from one of the C pages would merely return to B which, of course, would redirect right back to the C page.

I need a script that will cause clicking the browser's back button (while on a C page) to return to the particular A page from where I began. I don't care if the tweak is to the C pages, the B page, or both. But it must permit the browser's back button to function as described. If that is impossible, then I must rework to eliminate the redirect page, which is a convenient page I'd hate to give up.

Thank you.

BestZest
01-24-2003, 03:00 PM
In the B redirect page instead of 'location.href' use 'location.replace("Cpage.html")'

This makes the C page replace the B page, so you go back to the A page when you click 'back'!

BestZest

tom_f
01-25-2003, 01:09 AM
Thank you.

I replaced window.location="Cpage.shtml"

with location.replace('Cpage.shtml')

and it worked as advertised!

100 gratitons* to BestZest






* International Standard Unit of gratitude