View Full Version : Change submit button to image

07-30-2008, 11:19 AM
I need to change my submit button to an image. I was using :

<input type="button" value="Submit" onclick="ValidateFld()" style="font: Arial; font-size: 9pt; color: #FFFFFF; font-weight: bold; background-color: #660000">

And I've tried these:

<INPUT TYPE="image" SRC="submit.gif" HEIGHT="30" WIDTH="124" value="Submit" onclick="ValidateFld()">
<input type=image src="submit.gif" value="submit" onclick="ValidateFld()">
<INPUT TYPE="image" SRC="submit.gif" HEIGHT="30" WIDTH="124" value="Submit" onclick="ValidateFld()" ALT="Submit Form">

... but none of them work... if I submit without filling in a required field, it alerts me but then goes to my thankyou page anyway, and I should get the results via email, but I dont.

Help :confused:

07-30-2008, 12:31 PM
This should be the answer. :)

<style type="text/css">
.buttonStyle {
border: none;
background: #FFF url('image.png');
<input type="button" class="buttonStyle" value="Button"/>

Change the highlighted to your image.

07-30-2008, 12:54 PM
Thank you so much, it works :D