text field within two drop down
<p>This script produce a drop down form where I can select the number of drop down fields that can be displayed. However I'm kind of stuck on that. My problem now is how to make default text field base on the value of the second drop down form? For example if I select 'Ms.' It will produce Two text field else it will just one text field.</p>

<p><strong>jQuery</strong></p>

<pre><code>$(document).ready(function() {
    $('#bookinfo_adult').change(function() {
        var num = $('#bookinfo_adult').val();
        var i = 0;
        var html = '';
        for (i = 1; i &lt;= num; i++) {
            html += '&lt;br&gt;' + i + '. &lt;select name="gender4-' + i + '"&gt;' + '&lt;/' + 'option&gt;' + '&lt;option value=' + '"m"&gt;Mr. ' + '&lt;/option' + '&gt;' + '&lt;option value=' + '"f"&gt;' + 'Ms. ' + '&lt;/option' + '&gt;' + '&lt;/select' + '&gt;&lt;/br&gt;';
        }
        $('#list').html(html);
    });
});​
</code></pre>

<p><strong>HTML</strong></p>

<pre><code>&lt;select id="bookinfo_adult" name="bookinfo_adult"&gt;
       &lt;option value="0"&gt;- SELECT -&lt;/option&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;/select&gt;
&lt;div id="list"&gt;&lt;/div&gt;
</code></pre>
