title: Changing popup content
body: <p>I'm opening a popup using <code>popup = window.open(....)</code> and then trying to insert some html into a div in the popup.  </p>
  
  <p><code>popup.document.getElementById('div-content').innerHTML = "hello world";</code> doesn't do anything however, <code>popup.document.getElementById('the-field').value = "Hello There";</code> changes the content of a field with an id="the-field".  </p>
  
  <p>Any idea why one is working but not the other? How can i replace the content of the div?</p>
  
  <p>hope you can help.</p>
  
  <p>EDIT:
  <em>the popup</em></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
     &lt;head&gt;
          &lt;title&gt;Report&lt;/title&gt;
          &lt;meta charset="utf-8"&gt;
     &lt;/head&gt;
  
      &lt;body&gt;
          &lt;header&gt;
  
          &lt;/header&gt;
  
          &lt;div id="div-content"&gt;&lt;/div&gt;
  
          &lt;div id="report-container"&gt;
              &lt;input type="text" id="the-field" name="the_field"/&gt;
          &lt;/div&gt;
  
          &lt;footer&gt;
          &lt;/footer&gt;
  
       &lt;/body&gt;
  
   &lt;/html&gt;  
  </code></pre>
  
  <p><em>the code</em>  </p>
  
  <pre><code>  function reportComplete(report_content)
    {
    var popup;
    var template_path;
  
    template_path = base_url + "application/views/secure/reports_preview.php";
    popup = window.open(template_path, "Report", "scrollbars=yes ,resizable=yes");
  
    popup.document.getElementById('the-field').value = "Hello There"; // this works
  
    popup.document.getElementById('div-content').innerHTML = "hello world";
  
    }
  </code></pre>