PDA

View Full Version : [javascript+HTML] preload?



cokelatdesign
January 17th, 2007, 05:17 PM
hi guys I have a website...there's a box that contain text and I use javascript to customize the scrollbar my question is sometimes when the page not load properly the box won't display the whole content (confused..?let's me just show you)

go to :
http://cg-animation.com/associates/nelson_dewey.html
and then scrolldown if everything seems okay then click on other employee then scrolldown to the bottom of the content and you'll se what i means

plus if you use IE7 to load the page but before the loading process is complete you hover your cursor to the 3d btn then it won't display a dropwon submenu instead it will display on top of the main menu until everything is load

my question is can a javascript do like a preloading in flash so it would make sure every elements are loading then display the page?

puppy
January 18th, 2007, 08:57 AM
sure it can:
<script>
function loaded () {
document.body.style.display = "block";
}
</script>
<body onload="loaded();" style="display:none;">
...
</body>