title: javaScript: window.open not displaying background image
body: <p>Please help me, I have been working on this for hours. I have just started playing with JavaScript.</p>
  <p>So I have a button that loads a new browser window, loads background image. As below, no problems.</p>
  <p>HTML</p>
  <pre><code>&lt;script&gt;
          setBackground();
  &lt;/script&gt;
  </code></pre>
  <p>JavaScript</p>
  <pre><code>function setBackground() {
      document.body.style.backgroundColor = &quot;#000000&quot;;
      document.body.style.backgroundImage = &quot;url(bg.jpg)&quot;
  }
  </code></pre>
  <p>Then I try to load another window on button click but the background image will not work. The window works, I can change the background color no problem, but I can't get the image to load. code below.</p>
  <pre><code>//load screen on button click
              document.getElementById(&quot;startButton&quot;).onclick = function() { 
                                                                          load()
                                                                          
                                                                      };
  
  
  function load() {
      //create the new screen
      newWindow = window.open(&quot;&quot;, &quot;&quot;, &quot;width=1550, height=800&quot;);
      newWindow.id = &quot;game&quot;;
      newWindow.document.body.style.backgroundColor = &quot;#000000&quot;;
      newWindow.document.body.style.backgroundImage = &quot;url(bg.jpg)&quot;;
      
  }
  </code></pre>
  <p>The files and images are located in the same folder, I'm using the same image, it works in the first example but not the second.</p>
  <p>Please help!!! Thanks in advance.</p>