Calculations and Check boxes
I have used javascript to crfeate a calculation that works. See below.
event.value = this.getField("End Time Day One").value - this.getField("Start Time Day One").value;
if (isNaN(event.value) || event.value == 0) {
event.value = ("");
}
if (this.getField("Check Box 1").value != "Off") {
event.value = this.getField("Total Hours Day One").value - 1;
}
However, when using this code and changing the fields to represent a different day, when the box is checked in the different day it subtracts from day one also, an d when unchecked and rechecked it continues to subtract. See below.
event.value = this.getField("End Time Day Two").value - this.getField("Start Time Day Two").value;
if (isNaN(event.value) || event.value == 0) {
event.value = ("");
}
if (this.getField("Check Box 2").value != "Off") {
event.value = this.getField("Total Hours Day Two").value - 1;
}
I aslo have the same problem with day 3 and check box 3.
Any help would be appreciated.
Thank you
