How to change the value of two hidden fields with the same id and name jquery?
<p>I have this fields</p>

<pre><code>&lt;input type="hidden" id="uidhcdm" name="uidhcdm" value="0"&gt;
&lt;input type="hidden" id="uidhcdm" name="uidhcdm" value="0"&gt;
</code></pre>

<p>and i am using a function called change val </p>

<pre><code>function changeval(x,val)
{ 
    $('#'+x).val(val);
}
</code></pre>

<p>but when i run the function it only affects the first hidden fields value but not the seconds!</p>

<p>Please help me !!</p>
