title: javascript popwin not working inside php
body: <p>i have created a small PHP script. See bellow:</p>
  
  <pre><code>$x=5;
  if ($x &gt;= 8 ) {
     echo "x is ".$x;
  } else {
     echo 'error';
     $errorWindow = 'www.google.com';
     echo "&lt;script type='text/javascript'&gt;
          popWin('$errorWindow', 'windowname', 'width=400,height=300,scrollbars=yes');
       &lt;/script&gt;";    
  }
  </code></pre>
  
  <p>but my popwin isn't working and i wonder why, message "error" is being printed on browser page, but the popup window doesn't appears. Can anyone help telling me what i am doing wrong? how can i get popwin?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I made a little changes in syntax,here is my full code for that page:</p>
  
  <pre><code> $x=5;
      if ($x &gt;= 8 ) {
         echo "x is ".$x;
      } else {
  ?&gt;&lt;script type="text/javascript"&gt;
                          function popWin(url)
                          {
                              var thePopCode = window.open(url,'','height=800, width=1000, top=500, left=200, scrollable=yes, menubar=yes, resizable=yes');
                              if (window.focus) 
                              {
                                  thePopCode.focus();
                              }
                          }
                      &lt;/script&gt;
                  &lt;?php
                  $errorWindow='google.com';
                  echo "&lt;script type='text/javascript'&gt;
          popWin($errorWindow);
       &lt;/script&gt;";    
              }
  </code></pre>