IMHO... In terms of interface design, its easier to auto-calc amounts, then you kind of take out the human element... And if youre involving 10 fields for some kind of calculation, and the value "they" enter is wrong, how do you point to the incorrect amount in the appropriate field? (assuming youve already set limits, and checked to make sure the values, if numeric, are within that range).
Its simpler to auto calc it for them. Although, you should also recheck the math on the server by re-calculating the field amounts again, just to be sure. ) hope any of this helps, John Ensign -----Original Message----- From: Tim Do [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 10:36 AM To: CF-Talk Subject: javascript addition Hello, Can anybody show me how you would I would validate the sum of several text boxes? This is what I'm trying to use but not having luck.. thanks in advance. function validate() { if (document.newBillingInfo.SCEPbilledAmount.value + document.newBillingInfo.SCEPpenaltyAmount.value + document.newBillingInfo.SCEPdelinquentAmount.value != document.newBillingInfo.SCEPtotalAmount.value) { alert("The total Billing amount does not add up correctly, Please check the values.") document.newBillingInfo.SCEPbilledAmount.focus() return false; } return true; } ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists