...

View Full Version : Image as submit button



JustAsking
06-21-2002, 02:46 AM
Here is a snippet of code from my page that has the form I am trying to process. When I click on either the "accept" image I want to submit the form with the value "I accept" and when I click on the "decline" image I want it to submit the form with the value "I decline". I can't get it to work exactly for me, any ideas?



<form name="rspecard" method="post" action="http://www.webdezign.com\cgi-bin\emailform.pl">
<TR>
<TD>
<IMG SRC="images/ecard-2_01.gif" WIDTH=263 HEIGHT=350></TD>
<TD>
<IMG SRC="images/ecard-2_02.gif" WIDTH=150 HEIGHT=350></TD>
<TD>
<IMG SRC="images/ecard-2_03.gif" WIDTH=23 HEIGHT=350></TD>
<TD>
<IMG SRC="images/ecard-2_04.gif" WIDTH=151 HEIGHT=350></TD>
<TD>
<IMG SRC="images/ecard-2_05.gif" WIDTH=163 HEIGHT=350></TD>
</TR>
<TR>
<TD>
<IMG SRC="images/ecard-2_06.gif" WIDTH=263 HEIGHT=29></TD>
<TD>
<A href="#" onmouseover="accept.src='images/ecard-2_07-over.gif';" onmouseout="accept.src='images/ecard-2_07.gif';">
<IMG NAME="accept" SRC="images/ecard-2_07.gif" WIDTH=150 HEIGHT=25 BORDER=0 onclick="document.rspecard.submit();">
</A>
</TD>
<TD>
<IMG SRC="images/ecard-2_08.gif" WIDTH=23 HEIGHT=29></TD>
<TD>
<A href="#" onmouseover="decline.src='images/ecard-2_09-over.gif';" onmouseout="decline.src='images/ecard-2_09.gif';">
<IMG NAME="decline" SRC="images/ecard-2_09.gif" WIDTH=150 HEIGHT=25 BORDER=0 onclick="document.rspecard.submit();">
</A>
</TD>
<TD>
<IMG SRC="images/ecard-2_10.gif" WIDTH=163 HEIGHT=29></TD>
</TR>
<TR>
<TD>
<IMG SRC="images/ecard-2_11.gif" WIDTH=263 HEIGHT=35></TD>
<TD>
<IMG SRC="images/ecard-2_12.gif" WIDTH=150 HEIGHT=35></TD>
<TD>
<IMG SRC="images/ecard-2_13.gif" WIDTH=23 HEIGHT=35></TD>
<TD>
<IMG SRC="images/ecard-2_14.gif" WIDTH=151 HEIGHT=35></TD>
<TD>
<IMG SRC="images/ecard-2_15.gif" WIDTH=163 HEIGHT=35></TD>
</TR>
<input type="hidden" name="subject" value="RSP Cocktail Soiree">
<input type="hidden" name="recipient" value="Beardy79@hotmail.com">
</form>

justame
06-21-2002, 04:20 AM
jus...
just a try® moving the 'onclick' part of the code??? to inside the <a href...tag vs how you have it in the <img ...tag now???

just a guessin'® 'cept ya nevvver know...lol...

/me just a presumes® tooo??? thattt you dooo have <table> n' </table> tags before your first n' last <tr> n' </tr> tags??? your opening <form... tag looks like its inbetween two <tr>'s???

JustAsking
06-21-2002, 04:44 AM
jus...

That did it, thanks :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum