I am trying to create a submit button as an image instead of the default button. Any help is appreciated.
<form id="form1" action="whereever.php" method="post"> <img src="myimage.jpg" onclick="form1.submit();" /> </form> Code (markup):
alternatively: <form id="form1" action="whereever.php" method="post"> <a href="javascript: form1.submit();"><img src="myimage.jpg" /></a> </form> Code (markup):
or with javascript! http://www.smileycat.com/miaow/archives/000224.php thanks to smileycat button tag with CSS always works better for me than input and image tag, it gets offset all the time...
Yeh definately. I have never used images to submit a form before and i didn't realise there was a way it could be done in HTML. My first instinct was JS. You learn something new everyday.