Help: Using images as forum buttons

liunx

Guest
Hi everyone!<br />
<br />
I have the following code:<br />
<input src=http://www.htmlforums.com/archive/index.php/"button_submit.gif" name="Submit" type="image" value="Submit"><br />
<input src=http://www.htmlforums.com/archive/index.php/"button_preview.gif" name="Preview" type="image" value="Preview" onclick="OpenPreview()"><br />
<input src=http://www.htmlforums.com/archive/index.php/"button_resetform.gif" name="Reset" type="image" value="Reset Form"><br />
<br />
Now, the problem is, when I click on the Preview button, the Submit button submits too... :mad:<br />
What's wrong with that code? It works when I don't use images...<br />
<br />
FYI: OpenPreview() is a javascript function.<br />
<br />
Any help appreciated. Thanks.<!--content-->You can use CSS for buttons. I believe this will work:<br />
<br />
<br />
<input name="Submit" type="submit" value="Submit" style="background-image: url('button_submit.gif');"><br />
<br />
<br />
Note that I also changed the type.<!--content-->
 
Back
Top