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 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Oct 2002
    Location
    Arkansas
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Form Help Please

    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?

  • #2
    Regular Coder
    Join Date
    May 2002
    Location
    Helsinki, Finland
    Posts
    231
    Thanks
    0
    Thanked 1 Time in 1 Post
    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. This may offer a part-solution for your problem.

    If problems appear, contact me privately or via e-mail,
    Zvona
    First Aid for
    Web Design

  • #3
    PlatinumProject
    Guest
    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

  • #4
    PlatinumProject
    Guest
    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

  • #5
    New Coder
    Join Date
    Oct 2002
    Location
    Missouri, USA
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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/
    Last edited by ocularis; 10-29-2002 at 03:52 PM.

  • #6
    New to the CF scene
    Join Date
    Oct 2002
    Location
    Arkansas
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you for all of the help. I will play around with the codes to see if one will work for me .


  •  

    Posting Permissions

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