title: Call Javascript function using PHP
body: <p>is it possible to call this function to print a document using PHP?</p>
  
  <p>Here is my code guys..</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script language="javascript"&gt;
     function Clickheretoprint()
     { 
       var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,"; 
           disp_setting+="scrollbars=yes,width=900, height=700, left=100, top=25";  
  
       var docprint=window.open("","",disp_setting); 
           docprint.document.open(); 
           docprint.document.write('&lt;html&gt;&lt;head&gt;&lt;title&gt;Testing&lt;/title&gt;'); 
           docprint.document.write('&lt;/head&gt;&lt;body onLoad="self.print()" style="width: 900px; height="auto" font-size:16px; font-family:arial;"&gt;');          
           docprint.document.write('&lt;h1&gt;Hello World!&lt;/h1&gt;');          
           docprint.document.write('&lt;/body&gt;&lt;/html&gt;'); 
           docprint.document.close(); 
           docprint.focus(); 
       }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Thank you.</p>