Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Images instead of buttons!!!!!

Status
Not open for further replies.

paragvshah

Programmer
Jan 11, 2001
109
IN
Hi Friends,

How can i use image buttons instead of default Submit & Reset

buttons created by forms. This is a registration form & validations for

diffrent fields are provided in a page called "validation.js" which is

called in this page. This is form tag :

<form name=&quot;Table3FORM&quot; enctype=&quot;text/html&quot; action=&quot;mailto:ABC@abc.com&quot;

method=POST>

This are submit & reset button tags:

<input type=SUBMIT name=&quot;FormHandler11&quot; value=&quot;Submit&quot;

id=&quot;FormHandler13&quot;>

<input type=&quot;reset&quot; name= &quot;Reset&quot; value=&quot;Reset&quot;>

</form>

please provide the tags that will replace this tags.
 
<input type=&quot;image&quot; src=&quot;yourImage.gif&quot;> - when you click this button, the form will be submitted automatically. Also you may have something like this
<a href=&quot;#&quot; onclick=&quot;Table3FORM.submit()&quot;><img src=&quot;yourImage.jpg&quot;></a>
The first one is simpler, but the second solution applies when, for example, you would like to have some mouseover effects.
---
---
 
uladzik, the best way to apply your 2nd solution would be :
<img src=... onclick=&quot;Table.....submit()&quot;>
it's best (as far as i know) to avoid using <a> when it's not really a link (one of the reason is that it's NOT a link, but your users will see it as a link - unless you apply a style to those links-that-are-not-links)
 
But what about reset button ? what script should i write.
 
onClick=&quot;this.form.reset()&quot;
b2 - benbiddington@surf4nix.com
 
uladzik i didn't know that
but why do you use onclick ????? <a href=&quot;yourform.submit()&quot;> works really fine in any browser s far as i know
and it was just details, nothing important -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top