title: Open a window with javascript, and have the HTML content loaded from an external source
body: <p>I am new to HTML/Javascript</p>
  
  <p>I want to open a window with javascript, and have it's HTML content loaded from an external source. 
  I used document.write() but it does not work unless I specifically write the HTML as a parameter</p>
  
  <p>Any idea how to let document.write read from an external source?</p>
  
  <p>Here is what I tried.</p>
  
  <pre><code>win.document.write('&lt;script src="window.html"&gt;&lt;/script&gt;');
  </code></pre>
  
  <p>window.html</p>
  
  <pre><code>  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;test&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          test
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>