I have a div
<div id="aDiv"></div>
When I try
Window.alert(RootPanel.get("aDiv").toString());
I get the element however, just after the above statement, when I
alert(document.getElementById("aDiv"));
It returns a null.
Can someone explain the discrepancies?