Reputation: 23
I have a calculator file that I am trying to modify to allow me to execute the calculation function more than once at a time.
To elaborate, I can currently use the calculator to get one score at a time however I would like it to accept more than one column of values and spit out a score under each column.
My script is currently not changing the values of the elements used to display them.
Upvotes: 2
Views: 63
Reputation: 207531
You are looking for id="collectSlack[i]"
not a number
document.getElementById("collectSlack[i]").value;
needs to be
document.getElementById("collectSlack["+ i + "]").value;
Upvotes: 1