title: How to refresh table contents in div using jquery/ajax
body: <p>I need your help in order to refresh a div <code>id="mytable"</code> in my html once the function is called from a method. Currently, I am loading the full page once it is called using the below lines.</p>
  
  <p>In my java method, I am using the below line to call a javascript method:</p>
  
  <pre><code>RequestContext.getCurrentInstance().execute("autoRefresh()"); 
  </code></pre>
  
  <p>The html code :</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function autoRefresh() {
          window.location.reload();
      }
  &lt;/script&gt;
  
  &lt;div id='mytable'&gt;
      &lt;h1 id='My Table'&gt;
          &lt;table&gt;&lt;/table&gt;
      &lt;/h1&gt;
  &lt;/div&gt;
  </code></pre>