title: Getting an element from a different frame
body: <p>I am desperately trying to get an element by its ID, which is located in another frame (NOT iframe). See following code to make things clear:</p>
  
  <pre><code>var elem = parent.frames['top'].document.getElementById('mydiv');
  alert(elem); // returns null
  </code></pre>
  
  <p>.</p>
  
  <pre><code>&lt;div id="mydiv"&gt;
  ...
  &lt;/div&gt;
  </code></pre>
  
  <p>If I alert <code>parent.frames['top'].document</code> I do get <code>[object]</code> returned. Am I missing something here?</p>