Hi twist!
the first version with form worked for changing
form[cr].value but couldn't set the new value for CoutTotale.
This last one I tried doesn't do any at all. Did I set it up wrong: Here's my changes:
function calcul(passedform)
{ thisform = document[passedform];
for(var i=0;i<thisform.nomb.value; i++)//set total for each row
{ var c13="text"+i+"13";
// document.write(c13);
var c17="text"+i+"17";
var c21="text"+i+"21";
//document.write(form[c13].value);
var r= parseInt(thisform[c13].value) + parseInt(thisform[c17].value) + parseInt(thisform[c21].value);
//document.write(r);
var cr ="text"+i+"22";
form[cr].value =r;
}
var CombTotal=0;
for(var d=0;d<thisform.nomb.value;d++)//set total for each row
{ var cr ="text"+d+"22";
CombTotal+=parseInt(thisform[cr].value);
}
//document.write(CombTotal);
var don ='CoutTotale';
thisform[don].value = CombTotal;
}
</SCRIPT>
the first version with form worked for changing
form[cr].value but couldn't set the new value for CoutTotale.
This last one I tried doesn't do any at all. Did I set it up wrong: Here's my changes:
function calcul(passedform)
{ thisform = document[passedform];
for(var i=0;i<thisform.nomb.value; i++)//set total for each row
{ var c13="text"+i+"13";
// document.write(c13);
var c17="text"+i+"17";
var c21="text"+i+"21";
//document.write(form[c13].value);
var r= parseInt(thisform[c13].value) + parseInt(thisform[c17].value) + parseInt(thisform[c21].value);
//document.write(r);
var cr ="text"+i+"22";
form[cr].value =r;
}
var CombTotal=0;
for(var d=0;d<thisform.nomb.value;d++)//set total for each row
{ var cr ="text"+d+"22";
CombTotal+=parseInt(thisform[cr].value);
}
//document.write(CombTotal);
var don ='CoutTotale';
thisform[don].value = CombTotal;
}
</SCRIPT>