I am currently using autoSum to add together two different sets of information on my form. I need a third autoSum to substract the second sum from the first, and I don't know how to do this.
Below is the working code for the two Sums on my form. I need the third box to output the total from calc() minus the total from calcLi()...
interval = setInterval("calc()",1);}
one = document.autoSumForm.firstBox.value;
two = document.autoSumForm.secondBox.value;
three = document.autoSumForm.thirdBox.value;
four = document.autoSumForm.fourthBox.value;
five = document.autoSumForm.fifthBox.value;
six = document.autoSumForm.sixthBox.value;
seven = document.autoSumForm.seventhBox.value;
document.autoSumForm.totalBox.value = (one * 1) + (two * 1) + (three * 1) + (four * 1) + (five * 1) + (six * 1) + (seven * 1);}
intervalLi = setInterval("calcLi()",1);}
one = document.autoSumForm.firstLiBox.value;
two = document.autoSumForm.secondLiBox.value;
three = document.autoSumForm.thirdLiBox.value;
four = document.autoSumForm.fourthLiBox.value;
five = document.autoSumForm.fifthLiBox.value;
six = document.autoSumForm.sixthLiBox.value;
seven = document.autoSumForm.seventhLiBox.value;
eight = document.autoSumForm.eightLiBox.value;
document.autoSumForm.totalLiBox.value = (one * 1) + (two * 1) + (three * 1) + (four * 1) + (five * 1) + (six * 1) + (seven * 1) + (eight * 1);}
Any help would be greatly appreciated! Thanks.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)