DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Web Site Building & Maintenance

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 10-03-2009, 12:04 PM   #1
don Arnoldy
Curmudgeon
 
don Arnoldy's Avatar
 
Join Date: Oct 2004
Posts: 496
Default It shouldn't be this hard!!!

Folks-

I'm stumped. I'm building an order form, where I want the total price to calculate, as the user enters quantities for the items. this should be simple.

here is the snippet of the HTML:
HTML Code:
<fieldset id="order">
    <legend>Please send me:</legend>
    <ol>
        <span id="earlyorder">
            <li>
                <input name="EBTix" type="text" size="3" onChange="CalcTotal(this.form)">
                <label for="EBTix">Early Bird Tickets @ $20 ea.</label>
                =&nbsp;$<input name="EBSub" type="text" size="5" disabled>
            </li>
        </span>
        <span id="normalorder">
            <li>
                <input name="GATix" type="text" size="3" onChange="CalcTotal(this.form)">
                <label for="GATix">General Admission Tickets @ $25 ea.</label>
                =&nbsp;$<input name="GASub" type="text" size="5" disabled>
            </li>
            <li>
                <input name="SRTix" type="text" size="3" onChange="CalcTotal(this.form)">
                <label for="SRTix">Senior (60+) Tickets @ $20 ea.</label>
                =&nbsp;$<input name="SRSub" type="text" size="5" disabled>
            </li>
            <li>
                <input name="CHTix" type="text" size="3" onChange="CalcTotal(this.form)">
                <label for="CHTix">Child (6&nbsp;&ndash;&nbsp;12 yrs) Tickets @ $20 ea.</label>
                =&nbsp;$<input name="CHSub" type="text" size="5" disabled>
            </li>
        </span>
            <li>Total Order =&nbsp;$<input name="TotOrd" type="text" size="5" diabled></li>
    </ol>
</fieldset>
Here is the function:
Code:
    function CalcTotal(theForm){
        theForm.EBSub.value = theForm.EBTix.value * 20
        theForm.GASub.value = theForm.GATix.value * 25
        theForm.SRSub.value = theForm.SRTix.value * 20
        theForm.CHSub.value = theForm.CHTix.value * 20
        theForm.TotOrd.value = theForm.EBSub.value + theForm.GASub.value + theForm.SRSub.value + theForm.CHSub.value
    }
The the values are being correctly calculated, and the total field is being properly updated--but none of the subtotal fields display the value! i don't get it.

HELLLLLP!

--don

   
__________________
--don
don Arnoldy is offline   Reply With Quote
 

Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
hard drive/back up Michael Beloved Hardware & Gadgets 0 03-11-2009 10:35 AM
Archiving and hard drives ktinkel Hardware & Gadgets 11 09-19-2008 07:05 AM
W3C validation is very hard andrewking Web Site Building & Maintenance 10 08-17-2007 12:28 AM
Typography the hard way John Spragens Fonts & Typography 1 02-13-2006 12:49 PM


All times are GMT -8. The time now is 07:31 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Contents copyright 2004–2018 Desktop Publishing Forum and its members.