Add Row to table

Add Row to table

I have a table with : Time, CAB, New, Follow Up, Reserved, Urgent radio buttons
 
Plus a javascript function + - that Adds / Removes a new row to the table with an incremented Counter (see below)
 
How can I code the page so that if you click on CAB it opens up a popup and the options you select are placed into a hidden field on the page (with the Counter as the id BUT only for the first time you select CAB.
 
I can get it to work IF its the first option (because this is hard coded in the html, but not for subsequent ones.
 
OR is there a good jQuery way of doing this.
 
I realise I may have been vague, so please ask me for furter informationa and i'll endeavour to explain more clearly.
 
Thanks
Darryl
 
 
 
 newTextBoxDiv.html('<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" STYLE="border-collapse: collapse; font-family: Tahoma; font-size: 10pt" BORDERCOLOR="#111111" WIDTH="100%" >'+
         '<TR class="ClinicTemplateRow">'+
   '<TD WIDTH="10%" HEIGHT="40" STYLE="border-style: solid; border-width: 1"><P ALIGN="center">'+
   '<SELECT SIZE="1" NAME="HH'+counter+'">'+
   '<OPTION VALUE="07">07</OPTION><OPTION VALUE="08">08</OPTION><OPTION VALUE="09">09</OPTION><OPTION VALUE="10">10</OPTION><OPTION VALUE="11">11</OPTION>'+
         '<OPTION VALUE="12">12</OPTION>'+
         '<OPTION VALUE="13">13</OPTION>'+
         '<OPTION VALUE="14">14</OPTION>'+
         '<OPTION VALUE="15">15</OPTION>'+
         '<OPTION VALUE="16">16</OPTION>'+
         '<OPTION VALUE="17">17</OPTION>'+
         '<OPTION VALUE="18">18</OPTION>'+
         '<OPTION VALUE="19">19</OPTION>'+
         '<OPTION VALUE="20">20</OPTION>'+
         '<OPTION VALUE="21">21</OPTION>'+
         '<OPTION VALUE="22">22</OPTION>'+
         '</SELECT>'+
         ' <B>:</B><SELECT SIZE="1" NAME="MM'+counter+'">'+
   '<OPTION VALUE="00">00</OPTION>'+
   '<OPTION VALUE="05">05</OPTION>'+
   '<OPTION VALUE="10">10</OPTION>'+
   '<OPTION VALUE="15">15</OPTION>'+
   '<OPTION VALUE="20">20</OPTION>'+
   '<OPTION VALUE="25">25</OPTION>'+
   '<OPTION VALUE="30">30</OPTION>'+
   '<OPTION VALUE="35">35</OPTION>'+
   '<OPTION VALUE="40">40</OPTION>'+
   '<OPTION VALUE="45">45</OPTION>'+
   '<OPTION VALUE="50">50</OPTION>'+
   '<OPTION VALUE="55">55</OPTION>'+
   '</SELECT></TD>'+





























   '<TD WIDTH="10%" ALIGN="center" HEIGHT="40" STYLE="border-style: solid; border-width: 1">'+
   '<INPUT TYPE="radio" NAME="clintype'+counter+'" VALUE="CaB" class="cab"></TD>'+   
   '<div id="whatever'+counter+'"><TD WIDTH="10%" ALIGN="center" HEIGHT="40" STYLE="border-style: solid; border-width: 1">'+
   '<INPUT TYPE="radio" NAME="clintype'+counter+'" VALUE="New"></TD>'+
   '<TD WIDTH="10%" ALIGN="center" HEIGHT="40" STYLE="border-style: solid; border-width: 1">'+
   '<INPUT TYPE="radio" NAME="clintype'+counter+'" VALUE="Follow Up"></TD>'+
   '<TD WIDTH="10%" ALIGN="center" HEIGHT="40" STYLE="border-style: solid; border-width: 1">'+
   '<INPUT TYPE="radio" NAME="clintype'+counter+'" VALUE="Any"></TD></div>'+






   '<TD WIDTH="10%" ALIGN="center" BGCOLOR="#CCCCCC" HEIGHT="40" STYLE="border-left-style: solid; border-left-width: 5; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">'+
   '<INPUT TYPE="radio" NAME="clinstatus'+counter+'" VALUE="Reserved"></TD>'+
   '<TD WIDTH="10%" ALIGN="center" BGCOLOR="#CCCCCC" HEIGHT="40" STYLE="border-style: solid; border-width: 1">'+
   '<INPUT TYPE="radio" NAME="clinstatus'+counter+'" VALUE="Urgent"></TD>'+
   '</tr></table>  <input type="hidden" name="service'+counter+'" id="service'+counter+'">');.