title: window.opener.document access denied?
body: <p>So, I was hoping you guys could find the logic here?</p>
  
  <p>So after a bit of looking all I've found was access denied errors for the window.opener thing, but it seems to be something else for me. Because I can access that and some of its properties like 'closed'.</p>
  
  <p>I must be doing something wrong here...</p>
  
  <p>My code:</p>
  
  <p>The function that opens it (in a script tag on the parent page)</p>
  
  <pre><code>function openPopup(objectID) {
          var webpagina = "Fotos.aspx";
          var param = "objectid=" + objectID + "&amp;edit=true";
          var naam = "Fotos";
          var height = 500;
          var width = 300;
          var top = 250;
          var left = 400;
          var scroll = "Yes";
          var resize = "Yes";
  
          var newhref = webpagina + "?" + param;
  
          var popupwindow = window.open(newhref, naam, "toolbar=yes,titlebar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + scroll + ",resizable=" + resize + ",width=" + width + ",height=" + height + ",top=" + top + ",left=" + left);
          popupwindow.opener = window;
          popupwindow.focus();
      }
  </code></pre>
  
  <p>The onload function in the opened page:</p>
  
  <pre><code>window.onload = function () {
          var isclosed = window.opener.closed; //false
          var secretfield = window.opener.document.getElementById('scrtFoto');
      };
  </code></pre>
  
  <p>The access denied happens on the document, but not the closed, which is false. It's so weird, any help appreciated!</p>
  
  <p>Thanks in advance!</p>