coding 'back one page' in image

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Tipiford
Forum Newbie
Posts: 2
Joined: Mon May 07, 2012 4:08 am

coding 'back one page' in image

Post by Tipiford »

The line of code

<FORM><INPUT TYPE="button" VALUE="Return" onClick="history.go(-1);return true;"></FORM></div>

has served me well in form style, but we've been doing some updating and would like to move this code to an image. I tried

<a href="onClick="history.go(-1);return true;">
<input type="image" src="/graphic.jpg" alt="Submit button">

but there's no response on the image.
x_mutatis_mutandis_x
Forum Contributor
Posts: 160
Joined: Tue Apr 17, 2012 12:57 pm

Re: coding 'back one page' in image

Post by x_mutatis_mutandis_x »

[syntax]<input type="image" src="/graphic.jpg" onclick="javascript: history.go(-1);" />[/syntax]
or
[syntax]<a href="#" onclick="javascript: history.go(-1); return false;"><img src="/graphic.jpg" alt="Submit Button" /></a>[/syntax]
Tipiford
Forum Newbie
Posts: 2
Joined: Mon May 07, 2012 4:08 am

Re: coding 'back one page' in image

Post by Tipiford »

Thanx, we resolved it with

<input type="image" src="/images/graphic.jpg" alt="Submit button" onclick="history.go(-1); return true;" />
Post Reply