Autosum input boxes
What I'm trying, and is failing miserably, to do is to sum up 144 textboxes rows and columns (imagine a MS Excell-document.
Basic layout of text boxes:
[EP1] [EP2] [EP3] [EP4] ... [RowEPsum]
[FP1] [FP2] [FP3] [FP4] ... [RowFPsum]
[ES1] [ES2] [ES3] [Es4] ... [RowESsum]
... ... ... ... ... ... ...
[Column1sum] [Column2sum] [Column3sum] [Column4sum] [TOTALsum]
What I've managed to do so far is use the following code (example, not the actual code):
interval = setInterval("calc()",1);
one = document.autoSumForm.firstBox.value;
two = document.autoSumForm.secondBox.value;
document.autoSumForm.thirdBox.value = (one * 1) + (two * 1);
<input class="right" type=text name="firstBox" value="" onFocus="startCalc();" onBlur="stopCalc();"><br>
+ <input class="right" type=text name="secondBox" value="" onFocus="startCalc();" onBlur="stopCalc();"><br>
= <input class="right" type=text name="thirdBox">
It works like a charm, but for that many boxes it's just too much code and whenever I have to add new boxes, it's too much work.
I've tried different ways to loop through the boxes, but none of the codes I've compiled seems to do the trick. I have now spent too many hours on this, and I need help. Please?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread