> 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:
> >
> >         ...=eval(window.document.ExpenseForm.Mileage#Line#.value)+...
> >                                                           ^^^^^^
>
> Shoot.  Thanks. :)

Yah, no prob 8^)

> >BTW, why are you using "eval()?"
>
> I thought I had to in order to get Javascript to treat as numbers instead
> of text.

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 resolve just fine.

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/

______________________________________________________________________
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to