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.
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.
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.
<script>
var hasElement = document.getElementById('someId');
alert(hasElement);
</script>
<div id="someId">true</div>