Page 1 of 1

image button as a submit button

Posted: Fri Aug 20, 2010 4:07 am
by Anant
Hi Devs,

I am trying to place image button in the form and want it to act as a submit button.

After bit of googling - i found out if i add value to the image button it will act as a submit button -

Code: Select all

<input name="Submit" type="image" src="../../abc.gif" width="70" height="25" value="Submit" />
But this is obviously not working - is there something am doing wrong ??

Any help would be greatly appreciated.

Thank You.

Re: image button as a submit button

Posted: Fri Aug 20, 2010 1:30 pm
by oscardog
Fairly sure that by adding the value 'submit' to the button it wont make it suddenly work (You might want to try submit, no capitalisation though).

But another way around it would be to use javascript:

Code: Select all

<input name="Submit" type="image" src="../../abc.gif" width="70" height="25" value="Submit" onclick="this.submit()" />

Re: image button as a submit button

Posted: Fri Aug 20, 2010 3:00 pm
by shawngoldw
You're right, adding value won't make it magically work but you really don't need javascript to make it work...

Can you paste your entire form Anant?