title: javascript function is not executed
body: <p>Why alert("Test1") is executed, while alert("Test2") is not executed?
  P.S. Currently I'm not using json <code>data</code>.</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function() {
      var param = 10;
             $.getJSON(
                         'modules/mod_scheduler/updateList.php?param'+param,
                         function(data)
                         {
                             alert("Test1");
                             find_optimal_schedule();
                         }
             );
      });
  &lt;/script&gt;
  
  &lt;script language="javascript"&gt;
  function find_optimal_schedule() {
      alert("Test2");
      //...
  }
  &lt;/script&gt;
  </code></pre>