Can I use an image to post information from a form?

D

Dynamo

Hi,
Can I use an image to post information from a form instead of using a submit
button.
If so how should I set the attributes of the image and do I still use
<form method ="post" action = "url to post to">

<\form> .

Regards
Dynamo
 
V

VoLd

Yes you can:

<input type="image" src="(path)" name="submit" border="0">

should do the trick.
 
M

Michael Fesser

.oO(VoLd)
Yes you can:

<input type="image" src="(path)" name="submit" border="0">

should do the trick.

Except for the border-attribute (no such thing on input elements).
But an alt-attribute would make sense.

Micha
 
L

Lauri Raittila

Yes you can:

Well, I never said otherwise, and I actually gave link where there is
best instructions about how to do it right I have ever seen. The fact
that half of the page is about why it is bad idea is exactly the reason
why I didn't give fragment identifier for that point.
<input type="image" src="(path)" name="submit" border="0">

should do the trick.

Sure it does something, but could be done better. Why not read:
http://www.cs.tut.fi/~jkorpela/forms/imagebutton.html

Which you snipped whiout commenting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top