www.webdeveloper.com
Results 1 to 6 of 6

Thread: adding script to a graphic (back & forward buttons)

  1. #1
    Join Date
    Nov 2003
    Location
    Texas
    Posts
    9

    adding script to a graphic (back & forward buttons)

    Hello...I found a java script for a back button that would move a person one page back in history and I added it to my page to see what I got. I got a grey button with the word back on it and it worked which is great but what I would like to do is add that script to a graphic that I have so the button matches my background set. But I am unsure as to how I would do that.
    Any help would be greatly apprieciated!! Thank You!!

  2. #2
    Join Date
    Jul 2003
    Location
    Boston Area, Massachusetts
    Posts
    3,489
    Welcome to the forums.

    Could we please see the code you're working with? It would help us in giving you a better answer.

  3. #3
    Join Date
    Nov 2003
    Location
    Texas
    Posts
    9
    I am sorry...this is the first time I posted anything one here.
    The script that I found is: <a href="javascript:history.back(1)">Go Back</a>. Is that what you needed?

  4. #4
    Join Date
    Jul 2003
    Location
    Boston Area, Massachusetts
    Posts
    3,489
    Hey, everything's fine. I'm just letting you know so next time it will ensure you get a better answer.

    Yes, that is exactly what I'm looking for. All you'd need to do is this:
    Code:
    <a href="#" onclick="history.back(1);"><img src="filename" style="border: 0px;" alt="" /></a>
    Then, all you need to do is change filename to the filename of the image you want to appear.

    Good luck.
    Last edited by fredmv; 11-05-2003 at 11:34 AM.

  5. #5
    Join Date
    Nov 2003
    Location
    Texas
    Posts
    9

    Thank you!!

    Thank you so much fredmv....it worked!!
    I am very grateful for all your help!!

  6. #6
    Join Date
    Jul 2003
    Location
    Boston Area, Massachusetts
    Posts
    3,489
    You're very welcome.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles