title: About Window onload, ondomready etc
body: <p>From <a href="http://www.geekdaily.net/2007/07/27/javascript-windowonload-is-bad-mkay/" rel="nofollow">Geek Daily</a> :</p>
  
  <blockquote>
    <p>The onload event does not fire until every last piece of the page is loaded.</p>
  </blockquote>
  
  <p>Now I have a inframe in my jsf application and I can not replace by any means, this iframe with any other jsf component. I am trying to set the scroll position of the scrollbar resides in that iframe to a particular coordinate when the iframe is loaded. I have tried this:</p>
  
  <pre><code>    window.onLoad(onLoad);
  
      function onLoad() {
          var frames = window.parent.frames;
          var iframe = frames['frameR'];
          iframe.contentWindow.scrollTo(0, 200);
      }
  </code></pre>
  
  <p>But it's not working. I placed an <code>alert(iframe)</code> after <code>var iframe = frames['frameR'];</code> and it was displaying a message <code>[object Window]</code> but <code>iframe.contentWindow.scrollTo(0, 200);</code> is not working at all. </p>
  
  <p>Either I am doing something wrong or as all the jsf components are not rendered in the iframe, the iframe's scroll position can be set then. </p>
  
  <p>Is there any way to achieve this functionality?</p>
  
  <p>Is <code>onLoad</code> is the last event before render of all the components?</p>