How to populate a select box with Javascript
<p>I have a simple form with a select box i want to populate with data but i'm not understanding how to do.</p>

<p>This is my form:</p>

<pre><code>&lt;form name="form"&gt;    
 &lt;select name="req_one" style="width:250px;"/&gt; &lt;/select&gt;    
&lt;/form&gt;
</code></pre>

<p>This is what i tried in my JS:</p>

<pre><code>var name = 'test';
var i = 1;
document.form.req_one =new Option(name, i);
</code></pre>

<p>This should then result in the equivalent :</p>

<pre><code>&lt;option value="1"&gt; Test &lt;/option&gt;
</code></pre>

<p>What am i doing wrong?</p>
