Focusing first combo box using JavaScript
<p>I have combo boxes with same name and ID. I want to focus first combo box.</p>

<p>How can I do this?</p>

<pre><code>document.getElementById('test').focus();
</code></pre>

<p>This is the javascript code I was given to set the focus on the combo box but nothing happens.</p>

<p>I have a combo box like:</p>

<pre><code>&lt;select name="test" id="test"&gt;
         &lt;option value="0.25"&gt;0.25&lt;/option&gt;
         &lt;option value="0.50"&gt;0.50&lt;/option&gt;
          &lt;option value="1.00"&gt;1.00&lt;/option&gt;
&lt;/select&gt;

&lt;select name="test" id="test"&gt;
         &lt;option value="t1"&gt;t1&lt;/option&gt;
         &lt;option value="t2"&gt;t2&lt;/option&gt;
         &lt;option value="t3"&gt;t3&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>In my page I have the combo boxes like this with same name and ID.</p>

<p>Now I want to set focus to the first combo box .How can I do this using JavaScript?</p>
