JavaScript Populating an input Field Using an Html combo Box
<p>i am trying to find a way to allow a user to click items in a combo box and have its value populate an input field and also alert "work stop" or "work start" message when appropriate option is selected. But my code is not working. Please Help!
Here is my code:</p>

<pre><code>    &lt;html&gt;
    &lt;head&gt;

    &lt;/head&gt;
    &lt;body&gt;

    &lt;form&gt;
&lt;select name="sel1" onChange="populateField(this.form)" &gt;
    &lt;option value=""&gt;---Select---&lt;/option&gt;
    &lt;option value="stop" &gt;Stop&lt;/option&gt;
    &lt;option value="start"&gt;Start&lt;/option&gt;
&lt;/select&gt;

&lt;input type="text" id="eStop" name="eStop" /&gt;
&lt;/form&gt;
&lt;script type="text/javascript"&gt;

function populateField(frm){
 test = frm.stop.value;
 alert('work' test);
 frm.eStop.value = test;
}
&lt;/script&gt;
    &lt;/body&gt;
    &lt;/html&gt;
</code></pre>

<p>Thanks in Advance</p>
