ak dejo un html de como va este tema, con un copy paste puede ver el problema.
:(
Código Javascript
:
Ver original<html>
<head>
<title>Documento sin título</title>
<script>
function totall(totallll){
var cont = 0;
for (i=1 ; i<document.forms[0].length ; i++){
if(document.forms[0].elements[i].value != ""){
cont= cont+ document.forms[0].elements[i].value;
}
}
document.venta.total5.value=parseInt(cont);
}
</script>
</head>
<body>
<form name="venta">
<table width="547">
<tr>
<td width="32"><input name="can1" type="text" id="can1" value="1" size="3" maxlength="2" autocomplete="off"/></td>
<td width="84"><input name="cod1" type="text" id="cod1" size="14" maxlength="13" autocomplete="off" /></td>
<td width="330"><input name="des1" type="text" id="des1" size="55" maxlength="50" autocomplete="off" readonly="readonly"/></td>
<td width="37"><input name="uni1" type="text" id="uni1" size="6" maxlength="4" autocomplete="off" value="12" readonly="readonly"/></td>
<td width="40"><input name="sub1" type="text" id="sub1" value="12" size="6" maxlength="5" readonly="readonly" autocomplete="off"/></td>
</tr>
<tr>
<td><input name="can2" type="text" id="can2" value="2" size="3" maxlength="2" autocomplete="off"/></td>
<td><input name="cod2" type="text" id="cod2" size="14" maxlength="13" autocomplete="off"/></td>
<td><input name="des2" type="text" id="des2" size="55" maxlength="50" autocomplete="off" readonly="readonly"/></td>
<td><input name="uni2" type="text" id="uni2" size="6" maxlength="4" autocomplete="off" value="12" readonly="readonly"/></td>
<td><input name="sub2" type="text" id="sub2" size="6" maxlength="5" value="24" readonly="readonly" autocomplete="off"/></td>
</tr>
<tr>
<td><input name="can3" type="text" id="can3" value="2" size="3" maxlength="2" autocomplete="off"/></td>
<td><input name="cod3" type="text" id="cod3" size="14" maxlength="13" autocomplete="off"/></td>
<td><input name="des3" type="text" id="des3" size="55" maxlength="50" autocomplete="off" readonly="readonly"/></td>
<td><input name="uni3" type="text" id="uni3" size="6" maxlength="4" value="16" autocomplete="off"/></td>
<td><input name="sub3" type="text" id="sub3" size="6" value="32" autocomplete="off"/></td>
</tr>
<tr>
<td><input name="can4" type="text" id="can4" size="3" maxlength="2" autocomplete="off"/></td>
<td><input name="cod4" type="text" id="cod4" size="14" maxlength="13" autocomplete="off"/></td>
<td><input name="des4" type="text" id="des4" size="55" maxlength="50" autocomplete="off" readonly="readonly"/></td>
<td><input name="uni4" type="text" id="uni4" size="6" maxlength="4" autocomplete="off"/></td>
<td><input name="sub4" type="text" id="sub4" size="6" value="0" autocomplete="off"/></td>
</tr>
<tr>
<td><input name="can5" type="text" id="can5" value="1" size="3" maxlength="2" autocomplete="off"/></td>
<td><input name="cod5" type="text" id="cod5" size="14" maxlength="13" autocomplete="off"/></td>
<td><input name="des5" type="text" id="des5" size="55" maxlength="50" autocomplete="off" readonly="readonly"/></td>
<td><input name="uni5" type="text" id="uni5" size="6" maxlength="4" value="24" autocomplete="off"/></td>
<td><input name="sub5" type="text" id="sub5" size="6" value="24" autocomplete="off"/></td>
</tr><tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td><input type="text" name="total5" id="total5" size="6" value="0" autocomplete="off" readonly="readonly"/></td>
</tr>
</table>
<input type="button" name="button" id="button" onClick="totall(total5);" value="Calcular">
</form>
</body>
</html>