title: DIV container stays blank
body: <p>I need to run the function <code>find_optimal_schedule()</code> every 5 seconds, while each time updating the DIV container <code>schedule</code>. Below is my code snippet. The problem is that <code>alert("Init")</code> is executed, while <code>alert("True")</code> or <code>alert("False")</code> are not executed. FireBug shows that <code>optimize.php</code> is runned every 5 seconds, but I don't understand why the content of DIV container stays blank all the time. </p>
  
  <p>P.S. The code <code>gantt.php</code> works properly, because I tested it in DIV container without the timer and the Gantt chart was displayed correctly. Therefore, I do not provide this code here, because it's not the case.</p>
  
  <p><strong>scheduler.php</strong></p>
  
  <pre><code>&lt;script&gt;
  window.setInterval(function(){                 
       find_optimal_schedule();
  }, 5000);
  &lt;/script&gt;
  
  &lt;script&gt;
  function find_optimal_schedule() {
      $.ajax({
          url: 'modules/mod_scheduler/pages.php?page=optimize.php',
          dataType: 'json',
          success: function(output){
              alert("Init");
              if(output.msg === 1){
                  alert("True");
                  $('#schedule').html(output.html);
              } else {
                  alert("False");
                  return false;
              }
          }
      });
  }
  &lt;/script&gt;
  
  &lt;div style="width:100%; height:350px; position:relative" id="schedule" class="schedule"&gt;&lt;/div&gt;
  </code></pre>
  
  <p><strong>pages.php</strong></p>
  
  <pre><code>&lt;?php
      @session_start();
  
      @$pag_mod = $_GET['pag_mod'];
  
      if(!isset($pag_mod))
          $pag_mod = 0;
  
      if (isset($_GET['pag_mod'])) {
          include 'modules/mod_scheduler/'.$_GET['pag_mod'];
      }
      else {
          include 'modules/mod_scheduler/scheduler.php';
      }
  ?&gt;
  </code></pre>
  
  <p><strong>optimize.php</strong></p>
  
  <pre><code>&lt;?php
  //  Dispay Gantt chart
  $html_code = '&lt;img src="modules/mod_scheduler/gantt.php"&gt;';
  
  echo json_encode(array('msg' =&gt; 1, 'html' =&gt; $html_code)); 
  ?&gt;
  </code></pre>