View Full Version : Using image as form submit button
Uzair
09-08-2006, 08:07 AM
I wanna use image as a form submit button. I'm using below code for this but the image dont work as button.... Tell me wots wrong with this
<td height="32" valign="middle" style="padding-left:5px;"><form action="maps/index.htm" method="post" style="display:inline;"><input type="image" src="images/getmap.gif" width="70" height="25" border="0"> <input name="textfield" type="text" style="height:20px; border:1px solid #666666;" value="Business or Category" size="20" maxlength="40" onFocus="clearDefaultandCSS(this)"></form>
</td>
ronaldb66
09-08-2006, 08:33 AM
I haven't tried this out, but according to the specs you could also try the button element:
<button type="submit" name="submit" value="submit">
Submit<img src="images/getmap.gif" alt="get map">
</button>
Although your approach should really work as well.
Uzair
09-08-2006, 08:38 AM
ITS NOT WORKING :(
Now I'm sending u complete TABLE code with ur BUTTON idea. Please tell me how can I solve this prob. My boss will kill me :(
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #000000;">
<!--DWLayoutTable-->
<tr>
<td width="232" height="143"> </td>
</tr>
<tr>
<td height="32" valign="middle" style="padding-left:5px;"><form action="maps/index.htm" method="post" style="display:inline;"><button type="submit" name="submit" value="submit">
Submit<img src="images/getmap.gif" alt="get map">
</button> <input name="textfield" type="text" style="height:20px; border:1px solid #666666;" value="Business or Category" size="20" maxlength="40" onFocus="clearDefaultandCSS(this)"></form>
</td>
</tr>
</table>
Uzair
09-08-2006, 09:49 AM
SORRY SORRY SORRY SORRY SORRY SORRY :(
The code is working properly..... thank you very much.
Actually I duplicated the page & was previewing the older one :(
ronaldb66
09-08-2006, 12:26 PM
You're welcome! ;) I usually just resort to the standard submit, so it's nice to hear of some alternatives.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.