I have an html form that I want to have generate a running total at the bottom of the form. I also want to do some other simple calculations but I am unable to find anything about doing simple calculations using javascript.i dont want someone to do this for me I just want someone to point me in the right direction aka what how to create a function to multiple a quantity times a price and add more then one to create a total.
Rough example:
<input type="text" name="qty1" onchange=""> <input type="text" name="price1" onchange="something">
<input type="text" name="qty2" onchange=""> <input type="text" name="price2" onchange="something">
and the total would be like this
=(qty1*price1)+(qty2*price2) and so on and i want place this number in my sql db when submited
I hope this isn't to difficult to explain.
I also want to skip fields with no entry.