Web Analytics Made Easy -
StatCounter Image as submit button - CodingForum

Announcement

Collapse
No announcement yet.

Image as submit button

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Image as submit button

    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?

    Code:
    <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="[email protected]">
    </form>
    "Computers are considered female - As soon as you make a commitment to one, you find yourself spending half your paycheck on accessories for it."

  • #2
    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???
    The New JustaBuster Version 2.0 OR JustaBusta Lite V2.0
    ...just a special® thanx kinda hugs to jkd n' nex ...:O)))

    CommemorateWTC.com --Please lend your support

    Comment


    • #3
      jus...

      That did it, thanks
      "Computers are considered female - As soon as you make a commitment to one, you find yourself spending half your paycheck on accessories for it."

      Comment

      Working...
      X