You didn't get the value, but the object:

<input type="Text" name="CostOfMeals#Line#" value="0" validate="float" 
required="Yes" size="5" maxlength="5" 
onchange="window.document.ExpenseForm.TotalAmount#Line#.value=eval(windo
w.document.ExpenseForm.Mileage#Line#.value)+eval(window.document.Expense
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, 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" 
onchange="window.document.ExpenseForm.TotalAmount#Line#.value=eval(windo
w.document.ExpenseForm.Mileage#Line#)+eval(window.document.ExpenseForm.C
ostOfMeals#Line#);">

But the third field evaluates to [object][object].  How do I get this to

add up?

T


______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
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

Reply via email to