title: editing dynamically generated table
body: <p>I have a dynamically generated tables the foot of the table contain some text fields when  click on save i want to add the value of text fields to the body of that table .
  here is the table </p>
  
  <pre><code>&lt;table border="1" class="entity_table"&gt;
   &lt;tfoot&gt;
     &lt;tr&gt;
       &lt;td&gt;
         &lt;div class="pane1"&gt;&lt;/div&gt;
         &lt;div class="pane2"&gt;
          &lt;input type="text" id="name"&gt;&lt;br&gt;
          &lt;select id="data"&gt;
           &lt;option value="1"&gt;int&lt;/option&gt;
           &lt;option value="2"&gt;tinyint&lt;/option&gt;
          &lt;/select&gt;
          &lt;br&gt;&lt;span id="save"&gt;save&lt;/span&gt;
         &lt;/div&gt;
       &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tfoot&gt;
  &lt;tbody class="table-body" id='myid'&gt;&lt;/tbody&gt;
  &lt;/table&gt; 
  </code></pre>
  
  <p>i did this but this is id specific ..i want to update that specific table on which it is clicked and edited .</p>
  
  <pre><code>var myName = document.getElementById("name");
      var data = document.getElementById("data");
      var Mtable = document.getElementById("myid");
  
      var rowCount = Mtable.rows.length;
      var mrow = Mtable.insertRow(rowCount);
  
      var mcell = mrow.insertCell(0);
      mcell.innerHTML = myName.value;
      var mcell1 = mrow.insertCell(1);
      mcell1.innerHTML = size.value;
  </code></pre>
  
  <p>i want to update each dynamically generated table with values that is entered in its table's foot section </p>