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 w
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 re
> 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 t
> 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
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
You didn't get the value, but the object:
-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 m
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,
Original Message-
> From: Thane Sherrington [mailto:[EMAIL 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,
dding 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:
But the third field evaluates to [object][object]. How do I get this
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:
But the third field evaluates to [object][object]. How do I get this to
add up?
T
10 matches
Mail list logo