Even though I'm only a novice, I think I've tried all of those things only to find out that different browsers (Netscape, IE, Opera, Firefox, Mozilla) respond differently to onload="whatever" and windows.onload = 'whatever'; and they process JavaScript at different times with respect to HTML.
So... I just estimate the first-time load time on the high side and use a timer.
Here's the meat of it (though I'm sure you already know this):
/* set up a timer with load time in milliseconds */
myTimerset = true;
mytimerid = window.setTimeout("myFunction()", 50000);
Then my function does this:
function myFunction()
{
/* Clear the timer so you could use it again */
if (myTimerset == true)
{
clearTimeout(mytimerid);
myTimerset = false;
};
/* whatever afterload processing you want goes here, ie. */
document.images.myImage.src = "myImage.gif"
};
I hope this isn't too far astray of what you guys are trying to do.
It works for me on
http://john.dodrill.name. I load all images as static images, to get the screen painted, then use a timer to load a rotating .gif at the top of the page.
On
http://john.dodrill.name/socalemployers, I have to wait until all frames are loaded before I can start seting inter-frame variables, so I use this technique.
Hope this helps. By the way, these are all just my personal pages I'm toying with so don't look to be impressed.