title: Printing a page using javascript does not work
body: <p>The following HTML page should open <a href="http://www.seznam.cz" rel="nofollow">http://www.seznam.cz</a> in a new window and then open the Print dialog to allow printing it.</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;script&gt;
              function printPage() 
              {
                  var newWindow = window.open("http://www.seznam.cz", "seznam");
                  newWindow.document.close();
                  newWindow.focus();
                  newWindow.print();
                  newWindow.close();
              }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;a onClick="printPage(); return false;" href=""&gt;Print&lt;/a&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>However it only prints a blank page with "about:blank" in the top right and the current date and time in the bottom right corner.</p>
  
  <p>Why doesn't  it work as expected?</p>