How to set the value of text inputs in a table in jQuery?
<p>I have these text inputs in a table :</p>

<pre><code>&lt;td&gt;&lt;input type='text' name='arrondi_devis_ht' class='calcul_total' size='8'&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type='text' name='arrondi_devis_ttc' class='calcul_total' size='8'&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="text" name='marge_pourcent' class='calcul_total' size='5' value='20,0'&gt;&lt;/td&gt;
</code></pre>

<p>I successfully get their value by performing this :</p>

<pre><code>var prix_unitaire_ht=parseFloat($(this).parents("tr").find('input[name="arrondi_devis_ht"]').val().replace(',','.'));
var prix_unitaire_ttc=parseFloat($(this).parents("tr").find('input[name="arrondi_devis_ttc"]').val().replace(',','.'));
var marge_pourcent=parseFloat($(this).parents("tr").find('input[name="marge_pourcent"]').val().replace(',','.'));
</code></pre>

<p>So i figured i could use a similar mechanism to set their values and tried this : </p>

<pre><code>$(this).parents("tr").find('input[name="arrondi_devis_ht"]').value=new_prix_ht;
$(this).parents("tr").find('input[name="arrondi_devis_ttc"]').value=new_prix_ttc;
$(this).parents("tr").find('input[name="marge_pourcent"]').value=new_marge;
</code></pre>

<p>Yet it does not work and their value remain unchanged. I've tried with .val instead of value, also to assign them an id and to do <code>find("#id").value</code> instead of the above without any result.</p>

<p>Could anyone please tell me what I'm doing wrong ?</p>
