title: Get data out of html table cells
body: <p>I have a huge html table that I am building dynamically, and I want to be able to get cell data out of it easily.<br>
  Here is how my table is set up. </p>
  
  <pre><code>   &lt;tr&gt;&lt;td  id="presCode0"&gt;V&lt;/td&gt;&lt;/tr&gt;
      &lt;tr&gt;&lt;td  id="presCode1"&gt;F&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
  <p>Each row element is numbered when I build my table.
  Each row has 5 cells and there are hundreds of rows in the table.  Each row when clicked calls a function like this: </p>
  
  <pre><code>onclick="switchToRequest(rownumber)"    
  </code></pre>
  
  <p>I have tried using: </p>
  
  <pre><code>function switchToRequest(i)
  {
  var presCode=''+'presCode' + i + '';
  attend.elements["codePick"].value=presCode.innerHTML;
  attend.elements["codePick"].value=$("#"+"presCode"+i);
  }
  </code></pre>
  
  <p>is there any way that I can get table cell values out of a complex table using Javascript?</p>