I have five text inputs
4 are user entered values
1 is to display the total
I am trying to get the total to display the total of all four boxes.
This is my javascript code...
function calcTotal(NewClaim) {
A = document.NewClaim.delegate1percent.value;
A = A * 1;
B = document.NewClaim.delegate2percent.value;
B = B * 1;
C = document.NewClaim.delegate3percent.value;
C = C * 1;
D = document.NewClaim.delegate4percent.value;
D = D * 1;
}
E = A + B + C + D;
alert(E);
document.NewClaim.total.value = E;
}
This is my Call...
<td><input type="text" name="delegate#count#percent" size="1" onChange="calcTotal(NewClaim);" /><td>
I am programming on a coldfusion page.
Anyone see anything wrong here??? The output i get when i remove the * 1 is it concatenates the values and with the *1 i get nothing.
4 are user entered values
1 is to display the total
I am trying to get the total to display the total of all four boxes.
This is my javascript code...
function calcTotal(NewClaim) {
A = document.NewClaim.delegate1percent.value;
A = A * 1;
B = document.NewClaim.delegate2percent.value;
B = B * 1;
C = document.NewClaim.delegate3percent.value;
C = C * 1;
D = document.NewClaim.delegate4percent.value;
D = D * 1;
}
E = A + B + C + D;
alert(E);
document.NewClaim.total.value = E;
}
This is my Call...
<td><input type="text" name="delegate#count#percent" size="1" onChange="calcTotal(NewClaim);" /><td>
I am programming on a coldfusion page.
Anyone see anything wrong here??? The output i get when i remove the * 1 is it concatenates the values and with the *1 i get nothing.