Click to See Complete Forum and Search --> : Browser back button


dkalmus
01-29-2003, 04:38 PM
I was wondering if someone could give me an example of the code needed to make the back button in IE go back two pages instead of one when hit.

Thanks,
Devlin

Zach Elfers
01-29-2003, 10:36 PM
Here is how to make a back button:

<a href="javascript:history.go(-2);">Back</a>

Charles
01-30-2003, 05:22 AM
Originally posted by dkalmus
I was wondering if someone could give me an example of the code needed to make the back button in IE go back two pages instead of one when hit.

Thanks,
Devlin I suspect, however, that you have some kind of redirect in the immediately previous page that you want to avoid. If that's the case then use location.replace() for your redirect. See http://developer.netscape.com/docs/manuals/js/client/jsref/location.htm#1194240.