title: GreyBox: calling the popup from inside a function
body: <p>In a php script, at certain point I need to show up a GreyBox popup: </p>
  
  <pre><code>&lt;?php
      if ($myvar==''){
  ?&gt;
      &lt;script&gt;
      // I need to show mypage.php in a GreyBox popup when in here
     GB_showCenter('Title', 'mypage.php' , 300, 620);
  
      &lt;/script&gt;
  &lt;?php
      }
  ?&gt;
  </code></pre>
  
  <p>The code above shows the popup when $myvar is empty but mypage.php never loads, the loading gif never stops turning and Firebug shows a "GB null" error pointing to loader_frame.html. </p>
  
  <p>I also tried: </p>
  
  <pre><code>GB_show("Title", "mypage.php");
  </code></pre>
  
  <p>but same problem. </p>
  
  <p>If I do: </p>
  
  <pre><code>&lt;a href="mypage.php" onclick="return GB_showCenter('Title', this.href , 300, 620)"&gt;Click here&lt;/a&gt;
  </code></pre>
  
  <p>somewhere in the page I have the popup with no problems so I know the files are correctly installed. </p>
  
  <p>What am I doing wrong? </p>
  
  <p>Thanks a lot! </p>