title: Can't get table data using GetElementById in Javascript/AJAX
body: <p>Here is my JavaScript function.</p>
  
  <pre><code>var ajaxRequest = new XMLHttpRequest;
  ajaxRequest.open("GET", "crudops.aspx?StudentId="+id+"&amp;StudentName="+name+"&amp;operation=insert", false);
  ajaxRequest.send(null);
  document.getElementById("TableDiv").innerHTML = ajaxRequest.responseText;
  var t = document.getElementById("TableDiv").innerHTML;
  alert(t);
  var row = table.insertRow(0);
  var cell1 = row.insertCell(0);
  var cell2 = row.insertCell(1);
  cell1.innerHTML = id;
  cell2.innerHTML = name;
  </code></pre>
  
  <p>Here is what is there inside t.</p>
  
  <pre><code>&lt;table id="studenttable" cellpadding="5"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;Student Id&lt;/th&gt;&lt;th&gt;Student Name&lt;/th&gt; ... &lt;/table&gt;
  </code></pre>
  
  <p>But I'm unable to read table into a variable using something like </p>
  
  <pre><code>var table = t.getElementbyId("studenttable");
  </code></pre>
  
  <p>How to read that table and append rows?
  help me with suggestions.</p>