Is the problem that you need an Ajax call to complete on page load before the page is ready to use by the user? Or that onload is not being called until after the user starts clicking around and causing the issues?
For the former, I'd re-jigger the page to not require Ajax on page load using server-side tools (
JSP et al). Or, if that's not possible, hide (or disable) the body content until it is ready for interaction.
Same with onload. The problem with onload is that it waits around for images and other stuff to load. If that takes a while, the user might be able to get in there before you've had a chance to finish setting up the page.
jQuery adds a "document ready" handler that you can use to set up the page after the DOM is rendered, but before images are loaded. I don't know if Dojo has a similar concept.