quote:
Originally posted by Nathan
Use jquery, and there is the document.ready function, which executes whatever is in it as soon as the headers are requested.
It executes on DOMContentLoaded i.e., when the page's source code has been downloaded and the DOM can be manipulated - meaning images may not be loaded yet.
As far as I'm aware window.onload and co only execute once images have been loaded too.
http://docs.jquery.com/Events/ready
Edit: oh, and it's $.ready.