Forum Moderators: open

Message Too Old, No Replies

Using an image as a submit on form

How to use an image instead of a submit button on a form?

         

jetnovo

4:57 am on Aug 11, 2004 (gmt 0)

10+ Year Member



Hi all

I've been making forms on sites for a while now, but have always used the simple "submit" button:


<input type="submit" name="Submit" value="Submit">

I'd like to use an image instead of the button but don't know how to do this - can anyone help?

Noisehag

5:32 am on Aug 11, 2004 (gmt 0)

10+ Year Member



This should work:

<INPUT TYPE="image" SRC="images/submit.gif" HEIGHT="" WIDTH="">

Note: You don't need to specify the width and height, but the image slot will be reserved onload if you do.

jetnovo

10:18 pm on Aug 11, 2004 (gmt 0)

10+ Year Member



Thanks Noisehag, it works perfectly.

Interesting too, that the data that arrives via formmail lists and x and y co-ordinates of the image that the user clicked on to submit the form.

Very cool :)