[Javascript] Updating a text box - calculations
Tim Burgan
email at timburgan.com
Mon Feb 14 00:21:50 CST 2005
Ok.. it's official.. I suck at javascript.
Is anyone able to lend (another) hand?
I have my 5 text fields.. that dollar values are entered into, then a
6th box that calculates the total of all 5 boxes, but the values are not
being ADDED together for the totals box, instead the code is
CONCATENATING. What have I done, I can't figure it out?
Also, what's wierd is that when I try to update the text boxes via
onKeyUp="" , if I put addTotals() as the attribute value, I get a
javascript error, but if I put all my javascript on one line then paste
it into each fields onKeyUp attribute, the code works (except it's
concatenating or course).
I have setup an example at http://www.timburgan.com/form.htm
What's goin on here?
Cheers
Tim
More information about the Javascript
mailing list