title: Access cross domain nested iframe from within the main iframe
body: <p>I have a page that has a cross-domain iframe.  On the page loaded in the iframe is a print button that runs some javascript to print an iframe named printFrame sitting on the page (on the nested page, not on the parent page).  When I click on the button, in FF it works but IE gives me an error: frames.printFrame is null or not an object.  I'm confused.  The code is not trying to access the parent document, why isn't it working?</p>
  
  <p>The code crashes on line 9 of iframedoc.html, when I try to access the printframe</p>
  
  <p>Parent document HTML:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
          &lt;title&gt;Insert title here&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;iframe src="http://www.otherdomain.com/iframeDoc.html"/&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>iframedoc.html:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Insert title here&lt;/title&gt;
  
  &lt;script type="text/javascript"&gt;
  
  function printContent(){
      frames['printFrame'].focus();
      var printFrameDiv = frames['printFrame'].document.getElementById("printDiv");
      printFrameDiv.innerHTML = document.getElementById('printableContent').innerHTML;
      frames['printFrame'].print();
      window.focus();
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;iframe id="printFrame" name="printFrame" src="/printFrame.html"&gt;&lt;/iframe&gt;
  
  &lt;div id="mainContent"&gt;
      &lt;div id="printableContent"&gt;
          My printable content is here
      &lt;/div&gt;
      &lt;div id="nonPrintableContent"&gt;
          Content that I dont want to print is here
      &lt;/div&gt;
      &lt;a href="javascript:void(0)" onclick="printContent()"&gt;Print&lt;/a&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>