Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Submit" a form with a picture instead of button

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Instead of the plain old squary submit button, I want to use a picture as my button. How do I associate the submit action with the picture when clicked?
 
Code:
onClick=form.submit()
Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Webmonkey has a good example at:


How did we make that monkey into a Submit button? Well, here's the code for the form:


<form action=&quot;nextpage4.html&quot; method=&quot;get&quot; name=&quot;form3&quot;>

<select name=&quot;menu&quot; size=&quot;3&quot; multiple>

<option value=&quot;1&quot;>menu item 1</option>

<option value=&quot;2&quot;>menu item 2</option>

<option value=&quot;3&quot;>menu item 3</option>

<option value=&quot;4&quot;>menu item 4</option>

</select>

<input type=&quot;image&quot; alt=&quot;The Monkey&quot; src=&quot;stuff/smallmonkey.gif&quot;>

</form>


You see? Just change the type from submit to image and provide a GIF. Now you're set


CDWD
 
Dont forget the border attribute in your input tag.. or else you get that nice thick blue line surrounding your submit image.

<input type=&quot;image&quot; src=&quot;img.gif&quot; border=&quot;0&quot; alt=&quot;&quot;>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top