title: Iframe pointing at local page is empty and inaccessible
body: <p>This is a strange one as up until very recently this functionality was working fine and is still working on a different site.</p>
  
  <p>I'm using an iframe to allow users to initiate downloads on a page without having to submit the actual page itself using asp.net:</p>
  
  <pre><code>&lt;iframe id="ifrDownload" name="ifrDownload"  scrolling="no" frameborder="0" marginwidth="0" marginheight="0" style="display: none;" src="Download.aspx"&gt;&lt;/iframe&gt;  
  </code></pre>
  
  <p>However recently when attempting the download I get the infamous "Permission denied to access property 'document' error when accessing the iframe, obviously the local file is on the same domain as the parent so I'm not sure why that's happening, but I'm sure it's related to the odd thing that happens when I inspect the page in Firebug.</p>
  
  <p>The site that works without any problems displays the following for the iframe when inspected:</p>
  
  <pre><code>&lt;iframe id="ifrDownload" scrolling="no" frameborder="0" src="Download.aspx"  style="display: none;" marginheight="0" marginwidth="0"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;title&gt; &lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form id="downloadForm" action="Download.aspx" method="post" name="downloadForm"&gt;
  &lt;div&gt;
  &lt;input id="__VIEWSTATE" type="hidden" value="/wEPDwULLTExNjE3Nzc3MzlkZMnbcG6xJn5Jp/GA7fqNd/QyKuTC" name="__VIEWSTATE"&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;input id="__EVENTVALIDATION" type="hidden" value="/wEWBgLTi7KCAQLnqqEBAuXC+6cLAoPKgZYKAvWdu+YGApj5qL4FFEFbauoxzxy+93iYHGZSO7dPLso=" name="__EVENTVALIDATION"&gt;
  &lt;/div&gt;
  
  &lt;div&gt;
  &lt;input id="downloadButton" type="submit" style="display: none;" value="Confirm Download" name="downloadButton"&gt;
  &lt;input id="attachmentIdField" type="hidden" name="attachmentIdField"&gt;
  &lt;input id="tableFieldId" type="hidden" name="tableFieldId"&gt;
  &lt;input id="filenameField" type="hidden" name="filenameField"&gt;
  &lt;input id="whichField" type="hidden" name="whichField"&gt;
  &lt;/div&gt;
  
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  &lt;/iframe&gt;
  </code></pre>
  
  <p>But the non-working site simply shows:</p>
  
  <pre><code>&lt;iframe id="ifrDownload" scrolling="no" frameborder="0" src="Download.aspx" style="display: none;" marginheight="0" marginwidth="0" name="ifrDownload"&gt;
  &lt;html&gt;
  &lt;head&gt;&lt;/head&gt;
  &lt;body&gt;&lt;/body&gt;
  &lt;/html&gt;
  &lt;/iframe&gt;
  </code></pre>
  
  <p>The Download.aspx file is pretty much identical for both sites and is in the same directory as the parent page for both, I can only think I've inadvertently put some code somewhere that's breaking the way the iframe works.</p>
  
  <p>Any suggestions? I've Linted the HTML and all seems fine.</p>