title: jquery to refresh div content generated by php
body: <p>How to refresh a div content generated by the same php page using jquery</p>
  
  <p>i have a <code>test.php</code>, that contains a div called <code>refreshdiv</code>, a button called <code>refreshbutton</code> and may other div's that display other contents</p>
  
  <p>the content of <code>refreshdiv</code> div is generated by php</p>
  
  <p>is it possible to reload the contents of the <code>refreshdiv</code> on clicking <code>refreshbutton</code> on the same page ie, <code>test.php</code></p>
  
  <p>here is my work around</p>
  
  <pre><code>&lt;div id="refreshdiv"&gt;
  &lt;table&gt;
   &lt;?php 
     $rec=mysql_query("select * from user_master");
     for($i=0;$i&lt;mysql_fetch_array($rec);$i++) 
     {
   ?&gt;
   &lt;tr&gt;
     &lt;td&gt;
       &lt;?php echo mysql_result($rec,$i,'username');?&gt; 
     &lt;/td&gt;
   &lt;/tr&gt;
  &lt;?php } ?&gt;
  &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>tried using $.get, but didnt get any result</p>