title: Javascript, accessing nested frames in framesets from a iFrame
body: <p>I'm having issues accessing a frame that is part of a page loaded into a iframe.  The frame is nested in multiple framesets.</p>
  
  <p>My html looks like this:</p>
  
  <pre><code>&lt;iframe name="sourceframe" src="siteindex.html"&gt;
      #document &lt;-- this appears in the dom tree. Not sure if it's relevant.
          &lt;html&gt;
              &lt;head&gt;&lt;/head&gt;
              &lt;frameset&gt;
                  ...other frames
                  &lt;frameset&gt;
                      &lt;frame name="targetframe" src="sitesubpage.html"&gt;
                          ...I want to access this frame and replace the contents with a different html page...
                      &lt;/frame&gt;
                  &lt;/frameset&gt;
              &lt;/frameset&gt;
          &lt;/html&gt;
  &lt;/iframe&gt;
  </code></pre>
  
  <p>I have read similar questions none of which have a solution that I can get to work.</p>
  
  <p>Any suggestions would be greatly appreciated.</p>