Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    -27° 28' 22" , 153° 1' 22"
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 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="Beardy79@hotmail.com">
    </form>

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    676
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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???

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    -27° 28' 22" , 153° 1' 22"
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts
    jus...

    That did it, thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •