Two id's for javascript function
<p>I have a javascript function that goes like this:</p>

<pre><code>function change_one()
{
var one = document.getElementById("one").value;

document.getElementById("tag").value=one;
}
</code></pre>

<p>It works fine until there are two elements the same id.</p>

<p>I'm using php to fetch stuff from mysql and while it's looping thru, it's echoing input tags that have the same id value.</p>

<p>How I get this javascript code to apply to all of the input tags that have the id equal to "one"?</p>
