update dropdown menu values depending on user selection
<p>I have the following html:</p>

<pre><code>&lt;label&gt;Sizes
  &lt;select name="item_options[product_size]"&gt;
    &lt;option value="s"&gt;small &lt;span class="avail-inventory"&gt;10&lt;/span&gt;&lt;/option&gt;
    &lt;option value="m"&gt;medium &lt;span class="avail-inventory"&gt;1&lt;/span&gt;&lt;/option&gt;
    &lt;option value="l"&gt;large &lt;span class="avail-inventory"&gt;5&lt;/span&gt;&lt;/option&gt;
    &lt;option value="xl"&gt;extra large &lt;span class="avail-inventory"&gt;10&lt;/span&gt;&lt;/option&gt;
  &lt;/select&gt;
&lt;/label&gt;
&lt;label&gt;Quantity
  &lt;select name="quantity"&gt;
    &lt;option value="1"&gt;1&lt;/option&gt;
    &lt;option value="2"&gt;2&lt;/option&gt;
    &lt;option value="3"&gt;3&lt;/option&gt;
    &lt;option value="4"&gt;4&lt;/option&gt;
    &lt;option value="5"&gt;5&lt;/option&gt;
    &lt;option value="6"&gt;6&lt;/option&gt;
    &lt;option value="7"&gt;7&lt;/option&gt;
    &lt;option value="8"&gt;8&lt;/option&gt;
    &lt;option value="9"&gt;9&lt;/option&gt;
  &lt;/select&gt;
&lt;/label&gt;
</code></pre>

<p>This is part of a shopping cart where the user can pick product option(size) and quantity. Since the quantity always varies, I would like the max quantity change on the fly depending on what product option the user chooses. </p>

<p>For instance if the user chooses size large the max number in quantity dropdown should also be only 5.</p>

<p>thanks a lot</p>
