Topic Areas
Free Scripts
Information
Resources
Tutorials
Information
Search
Help Forums
Contact
Link to Us
Submit Script
Privacy Policy
More Resources
Free Stuff
Web Resources
Other Links
PageResource.com: Learn HTML
Just Free Stuff
JavaScript City
Forward and Back Image Buttons

Script Introduction

This script will allow you to use browser-like forward and back buttons on your site, except the buttons are images of your choice.

Cut and Paste Code: BODY Section
This code should be placed between the <body> and </body> tags.

Installation Instructions

  1. Paste the BODY Section code from above between the <body> and </body> tags on your page, exactly where you want the forward and back images to appear.

  2. Find the matching lines below in the script and change the text in red to the URLs and text you wish to use:

    <a href="javascript:history.back()"><img src="http://yoursite.com/image1.gif" border="0" alt="Back" /></a>
    &nbsp;&nbsp;&nbsp;&nbsp;
    <a href="javascript:history.forward()"><img src="http://yoursite.com/image2.gif" border="0" alt="Forward" /></a>

  3. Check the Format Window to be sure you do not have one single line of code, or too many line breaks in the code.

Example

A working sample of the script is shown below.

Back      Forward

JavaScript Book
JavaScript: A Beginner's Guide
by John Pollock
What's New
Simple Searchbox script added.
More...
Web Xpertz
Find more JavaScript tools and resources at WebXpertz City! Click one of the links above to browse the various attractions within the city.