title: Trying to refresh one div content on a page without changing position of the div
body: <pre><code>    &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  
          &lt;title&gt;ajax div example&lt;/title&gt;
  &lt;script type="text/javascript" src="jscripts/jquery-1.6.4.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      var dbn,machine_name;
  function main_draw(d,m,r)
  {
      dbn = d;
      machine_name = m;
      draw_charts();
      if ( r &gt; 0 )
          {
              setRefreshid = setInterval("draw_pie()",r);
          }
  }
  function draw_charts()
  {
  
  document.getElementById('ajdiv4').innerHTML = "";
  document.getElementById('ajdiv3').innerHTML = "";
  document.getElementById('ajdiv2').innerHTML = "";
  document.getElementById('ajdiv1').innerHTML = "";
  draw_pie();
  draw_line();
  draw_space();
  draw_backup();
  
  }
  
  function draw_pie()
  {
  setTimeout(function() {
      $.ajax( {
  
          url: 'JSCharts/graph_pie1.html',
          success: function(html)
          {
              $("#ajdiv4").html(html);
          }
      }); }, 100);
  }
  
  function draw_line()
  {
  setTimeout(function() {
      $.ajax( {
  
          url: 'JSCharts/graph_line1.html',
          success: function(html)
          {
              $("#ajdiv3").html(html);
          }
      });  }, 200);
  }
  
  function draw_space()
  {
      setTimeout(function() {
      $.ajax( {
  
          url: 'JSCharts/space_graph.php',
          success: function(html)
          {
              $("#ajdiv2").html(html);
          }
      });  }, 300);
  }
  
  function draw_backup()
  {
      setTimeout(function() {
      $.ajax( {
  
          url: 'JSCharts/backup_graph.php',
          success: function(html)
          {
              $("#ajdiv1").html(html);
          }
      });  }, 400);
  }
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id="ajdiv1" style="float:left"&gt;&lt;/div&gt;
  &lt;div id="ajdiv2" style="float:left"&gt;&lt;/div&gt;
  &lt;div id="ajdiv3" style="float:left"&gt;&lt;/div&gt;
  &lt;div id="ajdiv4" style="float:left"&gt;&lt;/div&gt;
  
  &lt;button id="b1" onclick="main_draw('CQ1','va2apsap010',10000)"&gt;Display Content&lt;/button&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Above is an entire code which makes AJAX calls upon clicking on "Display Content" and after that it refreshes content of div "ajdiv4" by calling function "draw_pie". The only problem with this is that when it refreshes, it moves the pie graph all the way to the left. I would like it to stay and update it in the current position. Please help if any of you know what is going on here, Thanks.</p>