Hi i have a script like this :
function add()
{
c=document.form1.status1.checked;
d=document.form1.status2.checked;
if(c!=1)
document.form1.hidsum1.value=0;
else document.form1.hidsum1.value=document.form1.sum1.value
if(d!=1) document.form1.hidsum2.value=0;
else document.form1.hidsum2.value=document.form1.sum2.value
a=document.form1.hidsum1.value;
b=document.form1.hidsum2.value;
var e = parseInt(a)+parseInt(b);
document.form1.total.value=e;
}
And it works though. But i want to use looping to simplify the code.
Anybody can helps? i have no idea where to start.
Thanks for the help...