Click to See Complete Forum and Search --> : How to Submit using Img?


asolell
01-18-2003, 11:35 AM
Hi all,

I want to have a image that will act as a submit button.
How do I go about doing this?


Current code
<form method="POST" action="contactus_handler.php">

<input type="submit" value="Submit Results">
</form>

Future Code:

<form method="POST" action="contactus_handler.php">

<input type="Img" value="submitresults.gif">
</form>
???????????

Thanks for your help.

-Alon.

toma4toma
01-18-2003, 11:47 AM
Hi asolell

You almost had the solution...


<form method="POST" action="contactus_handler.php">

<input type="image" src="submitresults.gif" name="Submit" border="0">

</form>


regards,
toma4toma

asolell
01-18-2003, 02:27 PM
Thanks a lot.

I found a code snippet that also did the trick:


<a href="javascript:document.theForm.submit();">
<img src="image/askmoreinfo.gif" border="0">
</a>


But I'd rather use your HTML only tags suggestion.
Thanks for your help.
I knew there has to be a simple way than the JS :)

-Alon.