title: GetElementById returns null when using window.onload, but not when run from console
body: <p>I am attempting to find a div inside my website by id, but when I call getElementById from window.onload I get a null returned. I have verified that the element I am looking for exists and that it is not sharing an Id with any other element.</p>
  
  <p>The weird part of this is the fact that when I run a console command from chrome's Developer Tools the div is returned as it should be.</p>
  
  <p>I have provided a link to a simplified version on JSFiddle, as well as a brief display of what I am attempting, and would appreciate any input you fine people can provide.</p>
  
  <pre><code>&lt;script&gt;
      var hasElement = document.getElementById('someId');
      alert(hasElement);
  &lt;/script&gt;
  &lt;div id="someId"&gt;true&lt;/div&gt;
  </code></pre>
  
  <p><a href="http://jsfiddle.net/ph9Nc/2/" rel="noreferrer">http://jsfiddle.net/ph9Nc/2/</a></p>