<td style="width: 83%;" colspan="3"><table cellpadding="0" cellspacing="0" style="width: 100%; border-width: 0px;"> ----, <?php echo stripslashes(utf8_decode($donnees['product_name'])); ?> \" value =\"<?php echo stripslashes($donnees['product_name']); ?>\" size= \"60\" readonly=\"readonly\"></td> <?php echo stripslashes(utf8_decode($donnees['product_price'])); ?>" value="<?php echo $donnees['product_price']; ?>" size="3" onChange="champ_verrouille(this,<?php echo $donnees['product_price']; ?>)">€ | " size ="3" maxlength="3" onBlur="test_champ(this)" onChange="affichechoix('s<?php echo stripslashes($donnees['id_product_partenaire']); ?>', this)" > | </td> </tr> <tr> <td style="height: 3px;"></td> </tr>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question<script> function calcul_form() { with (document.forms.form1) { total.value = 0; total.value = (((total.value*100)+(comand_fdp.value*100))/100).toFixed(2); if(typeof(p1)!='undefined') { p1.value = (((q1.value*100)*(pu1.value*100))/10000).toFixed(2); total.value = (((total.value*100)+(p1.value*100))/100).toFixed(2); if(typeof(p2)!='undefined') { p2.value = (((q2.value*100)*(pu2.value*100))/10000).toFixed(2); total.value = (((total.value*100)+(p2.value*100))/100).toFixed(2); if(typeof(p3)!='undefined') { p3.value = (((q3.value*100)*(pu3.value*100))/10000).toFixed(2); total.value = (((total.value*100)+(p3.value*100))/100).toFixed(2); if(typeof(p4)!='undefined') { p4.value = (((q4.value*100)*(pu4.value*100))/10000).toFixed(2); total.value = (((total.value*100)+(p4.value*100))/100).toFixed(2); } } } } } } </script> <form name="form1" /> </form>
y compris bien entendu en mettant
<!--input type="text" name="p4" />
<form name="frm" ...> <... name="prod[]" .../> <... name="qte[]" .../> <... name="pu[]"... />coté javascript on utilise
for ( var n=0;n<document.frm["prod[]"].length;n++ ) { traitement de document.frm["prod[]"][n].value et le reste }coté php, $_POST['prod'] est un array