continued drop down boxes until
<p>I am looking for my script to accept a percentage in a drop down box, after the initial selection I want to calculate the remaining percentage and present the user with another drop down box, this would continue until there was a value of 0 left in the last box </p>

<p>here is my code so far, the first box works but after i have created it I lose the trigger to fire the code again , </p>

<p>Am I going about this the correct way? and can anyone suggest how I can correct the maths if the first drop box value is changed, Im not looking for someone to write code and scripts for me just some sound pointers on where to go with this. </p>

<p>and here is the code </p>

<pre><code>                &lt;script src="jquery.js"&gt;&lt;/script&gt;
            &lt;script&gt; 

            $(document).ready(function(){

            $("#choice").change(function() { 


                valper = $(this).val() ;

                valueLeft = 100 - valper;

                newline = "&lt;tr bgcolor='#666666'&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt; "
                newline += "&lt;td&gt;&lt;select  id='choice'&gt; " ; 

                for( i=valueLeft; i &gt;0; i--) {
                    newline += "&lt;option value=" + i + "&gt;" + i + " % &lt;/option&gt; " ;
                }

                newline += "&lt;/select&gt;&lt;/td&gt;  &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; " ; 

                $('#selector').append(newline)


            }); 

            });


            &lt;/script&gt; 

            &lt;table width="500" border="1" cellspacing="1" cellpadding="1" bgcolor="#CCCCCC" align="center"&gt;
              &lt;tr&gt;
                &lt;td width="50"&gt;top&lt;/td&gt;
                &lt;td&gt;&amp;nbsp;&lt;/td&gt;
                &lt;td width="50"&gt;&amp;nbsp;&lt;/td&gt;
              &lt;/tr&gt;

             &lt;tbody id='selector' &gt; 
              &lt;tr bgcolor="#666666" &gt;
              &lt;td&gt;&amp;nbsp;&lt;/td&gt;
              &lt;td&gt;
                 &lt;select  id="choice" name='1' &gt;
                    &lt;?php
                         for ( $counter = 100 ; $counter &gt; 0; $counter -= 1) {       
                         echo "&lt;option value='$counter'&gt;$counter%&lt;/option&gt; " ; 
                         };
                    ?&gt;
                &lt;/select&gt;&lt;/td&gt;
              &lt;td&gt;&amp;nbsp;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;/tbody&gt;

              &lt;tr&gt;
                &lt;td&gt;Bottom&lt;/td&gt;
                &lt;td&gt;&amp;nbsp;&lt;/td&gt;
                &lt;td&gt;&amp;nbsp;&lt;/td&gt;
              &lt;/tr&gt;

            &lt;/table&gt;
</code></pre>
