title: Appending children into a popup-window. (JavaScript)
body: <p>I'm having some trouble trying to get a fairly simple popupper to work. The idea is that the parent should open a popup window and then append a div in it.</p>
  
  <p>The relevant parts of the code:</p>
  
  <p><strong>parent.html</strong>:</p>
  
  <pre><code>var childWindow;
  
  function togglePref() {
      childWindow = window.open("popup.html", "prefPopup", "width=200,height=320");
  }
  
  function loadPopupElements() {
      var prefElements = document.getElementById("prefBrd").cloneNode(true);
  
      var childDoc = childWindow.document;
  
      var childLink = document.createElement("link");
      childLink.setAttribute("href", "pop.css");
      childLink.setAttribute("rel", "stylesheet");
      childLink.setAttribute("type", "text/css");
  
      childDoc.head.appendChild(childLink);
      childDoc.body.appendChild(prefElements);
  }
  </code></pre>
  
  <p><strong>popup.html</strong>:</p>
  
  <pre><code>&lt;head&gt;
  &lt;/head&gt;
  
  &lt;body onload="opener.loadPopupElements();"&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>This works fine with Safari and Chrome, but for some reason IE refuses to append anything.</p>