> 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. :) >>BTW, why are you using "eval()?" > I thought I had to in order to get Javascript to treat as numbers instead > of text. 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 remove them. S. Isaac Dealey Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. 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