Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-21-2002, 01:46 AM   PM User | #1
JustAsking
Regular Coder

 
Join Date: Jun 2002
Location: -27° 28' 22" , 153° 1' 22"
Posts: 135
Thanks: 0
Thanked 0 Times in 0 Posts
JustAsking is an unknown quantity at this point
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>
JustAsking is offline   Reply With Quote
Old 06-21-2002, 03:20 AM   PM User | #2
justame
Regular Coder

 
Join Date: Jun 2002
Posts: 676
Thanks: 1
Thanked 0 Times in 0 Posts
justame is on a distinguished road
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???
justame is offline   Reply With Quote
Old 06-21-2002, 03:44 AM   PM User | #3
JustAsking
Regular Coder

 
Join Date: Jun 2002
Location: -27° 28' 22" , 153° 1' 22"
Posts: 135
Thanks: 0
Thanked 0 Times in 0 Posts
JustAsking is an unknown quantity at this point
jus...

That did it, thanks
JustAsking is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:26 AM.


Advertisement
Log in to turn off these ads.