Update select multiple
<p>I'm trying to write a function to update the "multiple" select (the second one below) such that when I select Method1 (from the first select), only the options 1A, 1B and 1C appears in the second select, and likewise for 2A, 2B... only when I select Method2. Is there a way to do this. Please help. 
Many thanks in advance.</p>

<pre><code>&lt;select name="choices" onchange="updatesub()"&gt;
    &lt;option&gt;Method1&lt;/option&gt;
    &lt;option&gt;Method2&lt;/option&gt;
&lt;/select&gt;

&lt;select multiple="multiple" name="sub"&gt;
    &lt;option&gt;1A&lt;/option&gt;
    &lt;option&gt;1B&lt;/option&gt;
    &lt;option&gt;1C&lt;/option&gt;

    &lt;option&gt;2A&lt;/option&gt;
    &lt;option&gt;2B&lt;/option&gt;
    &lt;option&gt;2C&lt;/option&gt;
&lt;/select&gt;
</code></pre>
