This is the function that I am using to calculate the total time:
This function adds the total of all input fields with a class called calctime. The column called block time has fields with this calctime class. I had used another function to format the output in these columns as Hours and Mins eg 1:12 but now i cannot add the total time. I can only add hours. I have been stuck on this problem for days now.
<script>
function findTotal() {
var arr = document.getElementsByClassName('calctime');
var tot = 0;
for (var i = 0; i < arr.length; i++) {
if (parseFloat(arr[i].value))
tot += parseFloat(arr[i].value);
}
document.getElementById('grandtotal').value = tot + ':' + "00";
}
</script>