title: Fill DIV containers
body: <p>Please see my code below. The goal is the following. When a user presses the button, the function <code>main.php</code> should be executed. Once it's finished, the content of DIV <code>opt_container</code> should be filled by running function <code>ganttchart.php</code>. Indeed I don't know how to:</p>
  
  <ol>
  <li>execute <code>ganttchart.php</code> right after <code>main.php</code>. </li>
  <li>run <code>main.php</code> from <code>form</code>.</li>
  </ol>
  
  <p>Since I'm newbie in PHP, any suggestions will be very helpful to me.</p>
  
  <pre><code>&lt;div id="fragment-2"&gt;
      &lt;table width="100%"&gt;
          &lt;tr&gt;
              &lt;td width="100%"&gt; 
                  &lt;form name="optform" method="post" action=""&gt;
                      &lt;div class="buttons"&gt;
                          &lt;a href="" class="regular" onclick="click_function();return false;"&gt;
                          &lt;img src="images/opt.png" alt=""/&gt; Run optimizaton 
                          &lt;/a&gt;
                      &lt;/div&gt;
                  &lt;/form&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
       &lt;/table&gt;
  &lt;/div&gt;
  
  &lt;div id="opt_container"&gt;
  
  &lt;/div&gt;
  
  &lt;script language="javascript"&gt;
  function click_function() {
       $('#opt_container').load('optim/mainOptim.php');
  }
  &lt;/script&gt;
  </code></pre>