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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using graphics to submit a form?

Status
Not open for further replies.

taval

Programmer
Jul 19, 2000
192
GB
I need some help in making submit button into graphics that when clicked upon carry out the same function as the submit button.

Currently my code looks like this:

--------------------------------------------------------

<HTML>
<BODY>
<FORM METHOD=&quot;POST&quot; NAME=&quot;login&quot; ACTION=&quot;webdb.asp&quot; onSubmit=&quot;return checkPass()&quot;>

<TABLE width=600 align = center>
<TR>
<TD align=center BGCOLOR=#000077>
<font face=&quot;Arial,Helvetica&quot; color=#ffffff><font size=+2>Internet BackPocket Database</font></font>
</TD>
<td align=center>
<img src=&quot;bp_logo_sm.gif&quot; >
</td>
</TR>


<TR>
<TD BGCOLOR=#FFFFCC>
List all customers with BackPocket service
</TD>
<TD align= center>
<input name=&quot;Customers&quot; type=&quot;submit&quot; value=&quot;Customers&quot; onclick=&quot;javascript:gotonectpage(this);&quot;>
</TD>
</TR>

<TR>
<TD BGCOLOR=#FFFFCC>
...... other submit buttons with values

--------------------------------------------------------

For example my first submit button carries the value &quot;Customers&quot;, how would I replace the submit button with a graphic but have the same effect as just clicking the submit button.

Grateful for any help. Thanks.
Taha


 
you just need to replace
<input type=&quot;submit&quot;...
with
<input type=&quot;image&quot; src=&quot;...&quot;...
but beware! ii will send x&y coordinates of click-point to server.
If you specify name you will in your example receive Customers.x=...&Customers.y=...
if you don't specify, you will receive simply x=...&y=... [sig]<p>Michael Dubner<br>Brainbench MVP/HTML+JavaScript<br>
[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top