Javascript PreLoad

Soldato
Joined
18 Oct 2002
Posts
3,648
Location
Toronto, Ontario, Canada
Hi guys,

Does anyone know if there is a way to make a page do something before onLoad?

At the moment I am displaying a page of DIV's. They are all set to display: block. I am using the Javascript to make the display: none. It takes a second to do this with onLoad. Any ideas how I can make it not render the DIV's before the javascript gets chance to hide them?
 
I would set the divs to display: none, and then use the onload to display:block.
That way you don't get the flicker of divs...
However it's pretty useless if you don't have js, obviously. But then so is the onload.
 
Thanks, but I need the DIV's to be visible so it's accessible to non-JavaScript users. :) I will put up with the flicker, but if I can do it without the flicker then so much the better.
 
Back
Top Bottom