At 12:48 PM 9/30/02 -0400, S. Isaac Dealey wrote:
you could also use parseInt(string) or parseFloat(string) although if it
doesn't find an integer or a string at the beginning of the string it will
return NaN rather than . Also if there are non-numeric values on the end
of the string it will
I'm writing a form that allows a person to fill in the mileage and meal
expense, and then displays the total in a third field. I'm using this in
the meals expense field:
input type=Text name=CostOfMeals#Line# value=0 validate=float
required=Yes size=5 maxlength=5
, September 30, 2002 11:04 AM
To: CF-Talk
Subject: Adding two fields and displaying in a third
I'm writing a form that allows a person to fill in the mileage and meal
expense, and then displays the total in a third field. I'm using this in
the meals expense field:
input type=Text name=CostOfMeals#Line
PROTECTED]]
Sent: Monday, September 30, 2002 11:04 AM
To: CF-Talk
Subject: Adding two fields and displaying in a third
I'm writing a form that allows a person to fill in the mileage and meal
expense, and then displays the total in a third field. I'm using this in
the meals expense field
forgot the .values on the end of each var, that's why it was putting in [object],
should work now.
-Original Message-
From: Turetsky, Seth
Sent: Monday, September 30, 2002 11:19 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Adding two fields and displaying in a third
thane,
it's trying
Form.CostOfMeals#Line#.value);
-Original Message-
From: Thane Sherrington [mailto:[EMAIL PROTECTED]]
Sent: maandag 30 september 2002 17:04
To: CF-Talk
Subject: Adding two fields and displaying in a third
I'm writing a form that allows a person to fill in the mileage and meal
expense
At 11:22 AM 9/30/02 -0400, Mosh Teitelbaum wrote:
onchange=window.document.ExpenseForm.TotalAmount#Line#.value=eval
(window.document.ExpenseForm.Mileage#Line#)+eval(window.document.
ExpenseForm.CostOfMeals#Line#);
Add .value to the end of the 2 fields you're trying to add, as in:
At 11:22 AM 9/30/02 -0400, Mosh Teitelbaum wrote:
onchange=window.document.ExpenseForm.TotalAmount#Line#.value=eval
(window.document.ExpenseForm.Mileage#Line#)+eval(window.document.
ExpenseForm.CostOfMeals#Line#);
Add .value to the end of the 2 fields you're trying to add, as in:
At 11:22 AM 9/30/02 -0400, Mosh Teitelbaum wrote:
onchange=window.document.ExpenseForm.TotalAmount#Line#.value=eval
(window.document.ExpenseForm.Mileage#Line#)+eval(window.document.
ExpenseForm.CostOfMeals#Line#);
Add .value to the end of the 2 fields you're trying to add, as in:
At 02:49 PM 9/30/02 -0400, Mosh Teitelbaum wrote:
Nope, you shouldn't have to. JavaScript is supposed to add 2 values
together (via the + operator) if the values can both be resolved to
numerics. Otherwise, it appends the values. So long as both of your values
are numeric then, it should
10 matches
Mail list logo