title: After window.open, can't print in Safari for Mac
body: <p>I create a secondary browser window with Javascript code, using the window.open function, and fill it programmatically with some HTML content. It works well for all browsers that my application supports except for one: Safari on Mac. In fact, the window itself is OK but the print command is disabled. Does anybody have an idea why? I should mention that the main reason to show this window is to allow the users to print some data. I guess I could implement a "Print" button in the page but I would prefer not to (and it may not work either, but I haven't tried it).</p>
  
  <p>Here is a simplified example of the code that I use to create the HTML content:</p>
  
  <pre><code>        var pp = window.open("", "_blank");
          pp.document.writeln("&lt;html&gt;");
          pp.document.writeln("&lt;head&gt;");
          pp.document.writeln("&lt;title&gt;");
          pp.document.writeln("Hello");
          pp.document.writeln("&lt;/title&gt;");
          pp.document.writeln("&lt;/head&gt;");
          pp.document.writeln("&lt;body&gt;");
          pp.document.writeln("The body");
          pp.document.writeln("&lt;/html&gt;");
          pp.document.close();
  </code></pre>
  
  <p>I tried variations around that code, without any success. My tests are done with Safari 5.1 on Mac OS X 10.6.8. Any help is welcome!</p>