Dropdown list where options populate a second list js/php?
<p>I have a 2 dropdown lists side by side. When user selects from the first list, i need the second list's options to be displayed.</p>

<p>The sub-options will be retrieved from a database. I have a page that will return the necessary html given the specific parent. I just need the first list's selection to trigger an update of list #2.</p>

<p>Whats the best way of accomplishing this?</p>

<pre><code>&lt;select id="parent" name="list1"&gt;
    &lt;option value="1"&gt;Parent 1&lt;/option&gt;
    &lt;option value="2"&gt;Parent 2&lt;/option&gt;
    &lt;option value="3"&gt;Parent 3&lt;/option&gt;
    &lt;option value="4"&gt;Parent 4&lt;/option&gt;
&lt;/select&gt;

&lt;select id="child" name="list2"&gt;
&lt;/select&gt;
</code></pre>

<p>caveat: cant use a form, cause the selection's are part of another form.</p>
