Code:
newfield.onclick=function(){function sumaddexp ()
{
var add1 = document.getElementById("Additional_Expenses_0").value;
var add2 = document.getElementById("Additional_Expenses_1").value;
var add3 = document.getElementById("Additional_Expenses_2").value;
var add4 = document.getElementById("Additional_Expenses_3").value;
var add5 = document.getElementById("Additional_Expenses_4").value;
var subtotal = add1 + add2 + add3 + add4 + add5;
document.getElementById("extrasum").innerHTML = subtotal;
}}
I know it doesn't add to the total like I asked help with but I was trying anything. In this attempt I was trying to get it to subtotal and write into the div. I don't know if I'm failing at getting the value or if I'm not doing the innerHTML part right. I don't know where I'm failing.