JavaScript is case sensitive, so that should be parseInt() rather than
ParseInt().

Chris Lofback
Sr. Web Developer

TRX Integration
28051 US 19 N., Ste. C
Clearwater, FL  33761
www.trxi.com


-----Original Message-----
From: Tim Painter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 2:37 PM
To: CF-Talk
Subject: Re: javascript addition


You might try adding a ParseInt() function around the value as well:

e.g. ParseInt(document.newBillingInfo.SCEPbilledAmount.value) +
ParseInt(document.newBillingInfo.SCEPpenaltyAmount.value)
etc...

Tim P.

----- Original Message ----- 
From: "Tim Do" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 12:35 PM
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;
> 
> }
> 

______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to