title: How do we find the row in the table which was changed
body: <p>In the below table starting  from <code>&lt;td&gt;2&lt;/td&gt;</code> to the last everything is dynamic values from PHP.</p>
  
  <p>So each row contains the selectbox and the textbox which are dynamic. If any of the values are changed I should be able to get the row number such as "2" or "3" or "4" or so on which was in <code>td</code> how do i get that how do I create an array with these values separated by ','(do we need use join).</p>
  
  <pre><code> $("#btn_refAddNew2").click(function(){
       var totrows= $('#refTbl').attr('rows').length;
       for(i=2; i&lt;totrows; i++){
       $(".MyClass").bind("change",function(){
  
       });
  
   }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>  &lt;table id="myTable"&gt;
      &lt;tr&gt; 
       &lt;th&gt; Column1&lt;/th&gt;
       &lt;th&gt;  Column2&lt;/th&gt;
      &lt;/tr&gt;
  
  
    &lt;table id="refTbl" cellpadding="0" cellspacing="0" border=1 cellpadding=1 cellspacing=1 class="formTable"&gt;
      &lt;tr&gt; 
       &lt;th&gt;  &lt;/th&gt;
       &lt;th&gt; Reference Code &lt;/th&gt;
       &lt;th&gt; Reference Value &lt;/th&gt;
       &lt;th&gt; &lt;/th&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td valign="top"&gt;1 &lt;/td&gt;
       &lt;td valign="top"&gt;     
        &lt;select name="select1"  id="selct1" class="test" tabindex="" &gt;
        &lt;option&gt;&lt;/option&gt;
        &lt;/select&gt;
       &lt;/td&gt;
       &lt;td &gt; 
        &lt;textarea valign="top" cols="24" name="referencevalue1" id="referencevalue1"&gt;&lt;/textarea&gt;
       &lt;/td&gt;
      &lt;/tr&gt; 
      &lt;tr&gt; 
       &lt;td colspan="4"&gt; 
        &lt;input name="" type="submit" class="" id="add1" value="add" &gt;
       &lt;/td&gt;
      &lt;/tr&gt;
       &lt;tr&gt;
    &lt;td&gt;2&lt;/td&gt;
    &lt;td&gt; &lt;select name='se_refcode2' class='MyClass' id='referencecode2' tabindex='2&gt;
    &lt;option value="dynamic"&gt;DYNAMIC Value&lt;/option&gt;
    &lt;option value="dynamic"&gt;DYNAMIC Value&lt;/option&gt;
    &lt;option value="dynamic"&gt;DYNAMIC Value&lt;/option&gt;
    &lt;/select&gt;&lt;/td&gt; 
    &lt;td&gt; &lt;input name='tx_references2' id='referencevalue2' type='text' value='9' class='MyClass'  tabindex='2' size='20' maxlength='20'  &gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="rowtext" height="10" onmouseout="this.className ='rowtext';" onmouseover="this.className = 'highlightrowtext';"&gt;
    &lt;td&gt;3&lt;/td&gt;
    &lt;td&gt; &lt;select name='se_refcode2' class='MyClass' id='referencecode2' tabindex='2&gt;
    &lt;option value="dynamic"&gt;DYNAMIC Value&lt;/option&gt;
    &lt;option value="dynamic"&gt;DYNAMIC Value&lt;/option&gt;
    &lt;option value="dynamic"&gt;DYNAMIC Value&lt;/option&gt;
    &lt;/select&gt;&lt;/td&gt; 
    &lt;td&gt; &lt;input name='tx_references3' id='referencevalue3' type='text' value='8' class='MyClass'  tabindex='3' size='20' maxlength='20'  &gt;&lt;/td&gt;
    &lt;td&gt;4&lt;/td&gt;
    &lt;td&gt; &lt;select name='se_refcode4' class='MyClass' id='referencecode4' tabindex='4&gt;
    &lt;td&gt; &lt;input name='btn_refDelete' type='button' value='Delete' class='bttn_med' id='btn_refDelete'  data-value ='4' &gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;td&gt; &lt;input name='tx_references3' id='referencevalue3' type='text' value='8' class='MyClass'  tabindex='3' size='20' maxlength='20'  &gt;&lt;/td&gt;
  </code></pre>
  
  <p>@patrickdw:I wasnot able to post the comments</p>