Selective HTML Form Text Field Adder
Join the DZone community and get the full member experience.Join For Free
In a form, use on text fields like this: onblur="selectiveTotal(this.form, 1);" where 1 is a common number across all fields to be added, and where total1 is a field to save the total to. Work in progress to solve this common problem. totalTheTotals(a,b,c) adds the value of a and b and puts it in c.
Opinions expressed by DZone contributors are their own.