title: How to replace contents of <tr> tags using Ajax?
body: <p>I'm working with jsp and ajax.
  I'm trying to replace the innerHTML of the <code>&lt;tr&gt;</code> tag using ajax, which is not working for me-</p>
  
  <pre><code>&lt;tr id="replace"&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>The page which I call using ajax-</p>
  
  <pre><code>&lt;td&gt;
  &lt;% 
  String id = request.getParameter("id");
  out.println("&lt;h3&gt;"+id+"&lt;/h3&gt;");
  %&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>But the following works, which I dont require-</p>
  
  <pre><code>&lt;tr&gt;
  &lt;td id="replace"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>page called-</p>
  
  <pre><code>&lt;% 
  String id = request.getParameter("id");
  out.println("&lt;h3&gt;"+id+"&lt;/h3&gt;");
  %&gt;
  </code></pre>
  
  <p>So in short, what do I need to do to replace the innerHTML of an entire <code>&lt;tr&gt;</code> tag and not just one <code>&lt;td&gt;</code> tag ?</p>
  
  <p>Thanks a lot in advance !</p>