Forward / Backward Button


Example of Script
Grab the Code
Explanation of Code
This script produces two buttons which use the OnClick event handler to call the back() or forward() method of the History object. back() causes the window to which the History object belongs to revisit the URL immediately before the current one. forward() causes the window to which the History object belongs to revisit the URL immediately after the current one.

If you want to have only one button or the other on your page, delete the button tag you do not want to be displayed.

NOTE: This script utilizes the vistor's web browser history file - you do not have any control over what page the visitor is directed to when the button is pushed.

Copyright © 2001 John H. Bolgiano, Jr. - All rights reserved
Modified with permission for educational use by Roberta Bush