...

View Full Version : Form Help Please



MissNightAngel
10-28-2002, 03:43 PM
I am trying to creat an order form that is submitted via email and i am having trouble on one section. Does any one know how to make it so that when a person enters a qty and presses the add button, the subtotal box will show the total qty*price amount? I have done this in a Flash program but I don't want to use flash for this form. The form I have is as follows:

<FORM>
<table border=1 cellpadding=1 cellspacing=0 width="65%" align=center valign=middle>
<TR BGCOLOR="#666666"><td width="100%" align=center valign=middle>&nbsp;ITEMS:</td></tr>
<TR><TD align=center valign=middle>
Style 1 -- 35 Cigars<br>
Qty<input type=text size=4 name=cigarbox1qty value="">
&nbsp; &nbsp;Color:
<select name=35color multiple=5 size=1>
<option value="Black">Black
<option value="Blue">Blue
<option value="Brown">Brown
<option value="Red">Red
<option value="Green">Green
</select>
&nbsp; &nbsp; <input type=button name=add value=Add STYLE="background:FFCC99">
<TR><TD align=center valign=middle>
Style 2 -- 50 Cigars<br>
Qty<input type=text size=4 name=cigarbox2qty value="">
&nbsp; &nbsp;Color:
<select name=50color multiple=5 size=1>
<option value="Black">Black
<option value="Blue">Blue
<option value="Brown">Brown
<option value="Red">Red
<option value="Green">Green
</select>
&nbsp; &nbsp; <input type=button name=add value=Add STYLE="background:FFCC99">
<TR><TD align=center valign=middle>
Style 3 -- 100 Cigars<br>
Qty<input type=text size=4 name=cigarbox3qty value="">
&nbsp; &nbsp;Color:
<select name=100color multiple=5 size=1>
<option value="Black">Black
<option value="Blue">Blue
<option value="Brown">Brown
<option value="Red">Red
<option value="Green">Green
</select>
&nbsp; &nbsp; <input type=button name=add value=Add STYLE="background:FFCC99">
<TR><TD align=center valign=middle>
Style 4 -- Jewelry Box<br>
Qty<input type=text size=4 name=jewelryboxqty value="">
&nbsp; &nbsp;Color:
<select name=color multiple=5 size=1>
<option value="Red">Red
<option value="Black">Black
<option value="Blue">Blue
<option value="Brown">Brown
<option value="Green">Green
</select>
&nbsp; &nbsp; <input type=button name=add value=Add STYLE="background:FFCC99">
<TR><TD align=center valign=middle>
Subtotal:<input type=text name subtotal value="$">.00
</TABLE>
<input type=submit name=submit value="Send Order" STYLE="background:FFCC99">
<input type=reset name=reset value="Clear Form" STYLE="background:FFCC99">
</FORM>

Can anyone help me?

Zvona
10-29-2002, 10:43 AM
Because there were no replies, I'll provide the link for my site :
http://www24.brinkster.com/zvona/

There are some examples for FAQ. There's also an example : Calculating sum of two textfields (http://www24.brinkster.com/zvona/formCalculate.html). This may offer a part-solution for your problem.

If problems appear, contact me privately or via e-mail,

PlatinumProject
10-29-2002, 01:01 PM
yuo would have to use cgi i think or javascript but here is a pretty simple shopingcart

http://commerce-cgi.com/demo/commerce.cgi

thats the demo

and heres where you can download it

http://commerce-cgi.com/download.htm

goodluck

PlatinumProject
10-29-2002, 01:02 PM
i forghot to mention click on on of the links under shop and then just select some random stuff to buy than click on check out it will give you your total at the end and show how much of eech item you have selected :thumbsup:

ocularis
10-29-2002, 02:49 PM
To manipulate the fields like that, you will want to use some kind of client-side scripting. I recommend Javascript. It is fairly easy to use especially if you have ever programmed C++ or Java.

To tie it with the add button you will use an event called onClick to call a function in your Javascript.

Here are some good tutorials:
http://wsabstract.com/javaindex.shtml

http://www.webteacher.com/javascript/

MissNightAngel
10-29-2002, 08:55 PM
Thank you for all of the help. I will play around with the codes to see if one will work for me .:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum