Alors j'ai bien installé le logiciel,
j'ai fait quelques modifications :
Dans la fonction :
function calcul_form() {
with (document.forms.form1) {
p[param].value = q[param].value * pu[param].value ;
total.value += p[param].value * 1 ;
}
}
Et au niveau de la partie HTML
<tr>
<?php echo stripslashes($donnees['id_product']);?>
<th><input type="text" name="q<?php echo stripslashes($donnees['id_product']); ?>" size="3" maxlength="2" onBlur="test_champ(this)"></th>
<td><?php echo stripslashes($donnees['product_name']); ?></td>
<th><input type="text" name="pu<?php echo stripslashes($donnees['id_product']); ?>" value="<?php echo $donnees['product_price']; ?>" size="5" onChange="champ_verrouille(this,<?php echo $donnees['product_price']; ?>)"></th>
<th><input type="text" name="p<?php echo stripslashes($donnees['id_product']); ?>" size="8"></th>
</tr>
<script LANGUAGE="JavaScript">
param = <?php echo $donnees['id_product']; ?>;
}
}
</script>
Dans Firebug, il eme retourne bien les valeurs :
<script language="JavaScript"></script>
<tr>
<th>
<input type="text" onchange="champ_verrouille(this,1245)" size="5" value="1245" name="pu7"/>
</th>
</tr>
<script language="JavaScript">
</script>
<tr>
mais la fonction calcul_form ne s'execute pas.
merci a vous.