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 +
Use the function eval() with each textbox value:
Eval(document.newBillingInfo.SCEPbilledAmount.value)
- Matt Small
-Original Message-
From: Tim Do [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 12:36 PM
To: CF-Talk
Subject: javascript addition
Hello,
Can anybody show me
-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
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
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
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
: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
Thanks Stephen.. I tried that earlier but that only concatenates it
-Original Message-
From: Stephen Kellogg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 10:08 AM
To: CF-Talk
Subject: RE: OT javascript addition
Tim,
try adding () around the addition part like so
-Original Message-
From: Tim Do [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 11:30 AM
To: CF-Talk
Subject: RE: OT javascript addition
Thanks Stephen.. I tried that earlier but that only concatenates it
-Original Message-
From: Stephen Kellogg [mailto:[EMAIL PROTECTED
them that can help, or if you're in using IE only, use
VBScript instead.
- Original Message -
From: Tim Do [EMAIL PROTECTED]
Date: Tuesday, July 23, 2002 12:30 pm
Subject: RE: OT javascript addition
Thanks Stephen.. I tried that earlier but that only concatenates it
-Original Message
and 1,000.00 will not be interpreted as a number by javascript - the comma
and dollar sign need to be stripped).
HTH.
Shawn Grover
-Original Message-
From: Tim Do [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 12:30 PM
To: CF-Talk
Subject: RE: OT javascript addition
Thanks Stephen
, in this case if your numbers are formatted, then eval() will end up
raising an error.
My thoughts.
Shawn Grover
-Original Message-
From: Dan Haley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 1:13 PM
To: CF-Talk
Subject: RE: OT javascript addition
Try doing eval
there
also.
Dan
-Original Message-
From: Tim Do [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 11:30 AM
To: CF-Talk
Subject: RE: OT javascript addition
Thanks Stephen.. I tried that earlier but that only concatenates it
-Original Message-
From: Stephen Kellogg [mailto
it to work there
also.
Dan
-Original Message-
From: Tim Do [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 11:30 AM
To: CF-Talk
Subject: RE: OT javascript addition
Thanks Stephen.. I tried that earlier but that only concatenates it
-Original Message-
From: Stephen Kellogg
;
}
-Original Message-
From: Brook Davies [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 12:38 PM
To: CF-Talk
Subject: RE: OT javascript addition
I had the same problem the other day. This works FOR SURE:
eval(document.newBillingInfo.SCEPbilledAmount.value.valueOf())+eval
semicolons, semicolons :-)
-Original Message-
From: Tim Do [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 3:46 PM
To: CF-Talk
Subject: RE: OT javascript addition
Hi Brook,
this is what I'm using but getting expecting ) error... please help =)
function validate
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 2:30 PM
To: CF-Talk
Subject: RE: OT javascript addition
Thanks Stephen.. I tried that earlier but that only concatenates it
-Original Message-
From: Stephen Kellogg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 10:08 AM
To: CF
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 2:30 PM
To: CF-Talk
Subject: RE: OT javascript addition
Thanks Stephen.. I tried that earlier but that only concatenates it
-Original Message-
From: Stephen Kellogg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 10:08 AM
To: CF
)
document.newBillingInfo.SCEPbilledAmount.focus()
return false;
}
return true;
}
-Original Message-
From: Brook Davies [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 12:38 PM
To: CF-Talk
Subject: RE: OT javascript addition
I had the same
Very good point Isaac!.. .)
John
-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 12:15 PM
To: CF-Talk
Subject: RE: javascript addition
In terms of interface design, its easier to auto-calc amounts, then you
kind of take out
Thanks Brian!
-Original Message-
From: Brian Scandale [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 1:36 PM
To: CF-Talk
Subject: RE: OT javascript addition
Tim,
Below is a cut and paste of some javascript that I use to process numeric
fields and push calculated results
21 matches
Mail list logo