[jQuery] Re: keepp getting NaN vlue

2009-09-28 Thread Giovanni Battista Lenoci
runrunforest ha scritto: Hi, I'm making a calculator for freight customer It seems I'm on the right path. But there is two bugs i need help. The TOTAL TO PAY value always seem to appear as NaN at first instead of default 3. And the function of TOTAL TO PAY only work after checkbox is

[jQuery] Re: keepp getting NaN vlue

2009-09-28 Thread Shawn
further to that, you can do var distance = parseInt($(#distance.val(), 10); Using the radix (the second parameter - 10 in this case), forces the specific conversion you'd like. When dealing with dates at least, leaving out the radix can sometimes result in abnormal behavior that is VERY

[jQuery] Re: keepp getting NaN vlue

2009-09-28 Thread Liam Potter
I made some changes and it's now working, the problem was for the var's r2 and r3 on load there were no values for it to find, causing the NaN. here are my changes: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html

[jQuery] Re: keepp getting NaN vlue

2009-09-28 Thread RobG
On Sep 28, 9:21 pm, runrunforest craigco...@gmail.com wrote: Hi, I'm making a calculator for freight customer It seems I'm on the right path. But there is two bugs i need help. The TOTAL TO PAY value always seem to appear as NaN at first instead of default 3. And the function of

[jQuery] Re: keepp getting NaN vlue

2009-09-28 Thread runrunforest
Thank you everyone. @Liam: thats very neat fix. @Robg: I can learn alot form your solution.