Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Mel Smith" Newsgroups: comp.lang.javascript Subject: Re: JavaScript Case Project 3-1: The dreaded NaN error Date: Sun, 11 Nov 2012 10:56:17 -0700 Lines: 29 Message-ID: References: <055e7215-93ba-40a9-81f3-312ea0e4f5e2@googlegroups.com> X-Trace: individual.net hSI1eCqIu3EOaUssTFS+4wYc/SZxHWL8JvX8rel7JBCG8RmCwIPjymZ5tNg6ZQvJ4g Cancel-Lock: sha1:NChMA2J0APLvf3JaiyIHczmCH4c= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: csiph.com comp.lang.javascript:17170 wrote in message news:f361ca82-911a-4f52-9132-3f0af5baf3ca@googlegroups.com... > On Sunday, November 11, 2012 11:08:42 AM UTC-6, Mel Smith wrote: >> where I'm going wrong? > Sadly, I think I tried that, and it also failed. Hi: Well, *I* tested it on my machine, after inputting 123.45, and got a nice long floating point result !! Remember the *value* of an input field is *text* -- and is *not* a numeric ! You must get this 'value' and convert it to a numeric by some means. For example use parseFloat("123.45",10) . This says: Take the string "123.45" and convert it to a floating point numeric with a base 10 --- which is most surely what you wish. So, take another 'head-crashing' look at it. -Mel Smith Mesa, Arizona