Forum Moderators: open
Image button = submit button.
Sure, you could control the actual action that is taken using a JavaScript (to either submit the form or reset it). But what if someone has JavaScript turned off?
Do this instead (or in addition to your JS function):
<input type="image" name="submit" src="whatever.gif">
<input type="image" name="reset" src="whatever.gif">
Then, in your script (Perl or PHP) do something like the following:
if($submit_x) {
# the form was submitted
# do stuff
}
else {
# $reset_x was set instead
# reset form (=send back to previous page)
}