View Full Version : Showing the page when everything is loaded

07-20-2002, 11:48 PM
Hi, is it possible that I do something that the clients do not see anything on their screens until all my page is downloaded? And is this a good thing to do?! ( well, it's a little bit mysterious!)

07-21-2002, 01:54 AM
Hope this helps:

function init() {
if( document.all )
document.all["splashScreen"].style.visibility = 'hidden';
else if( !document.all && document.getElementById )
document.getElementById("splashScreen").style.visibility = 'hidden';
else if( document.layers )
document.splashScreen.visibility = 'hidden';
<body onload="init()">
document.writeln('<div id="splashScreen" style="position:absolute; left:0; top:0; width:'+((document.layers)?screen.width:'100%')+'; height:'+((document.layers)?screen.height:'100%')+'; visibility:visible; z-index:100; layer-backround-color:black; background-color:black;">');
document.writeln('<table width="'+((document.layers)?screen.width:'100%')+'" height="'+((document.layers)?screen.height:'100%')+'">');
document.writeln('<td align="center" valign="middle">');
document.writeln('<font color="black">Loading...</font>');

07-21-2002, 02:02 AM
if it's an asp page page, just put:


at the top of the page ;)

07-22-2002, 01:54 AM
Just make sure that the page loads quickly, so people don't give up on it.

07-22-2002, 06:28 PM
Well, thanx, it's not an asp page martin, and the page doesn't have much contents that it comes up slow, anyway, thanx.

PS: Is there any book or something talking about these kinda, well, tricks in DHTML? I dunno much about layers and making preloaders & ....., how can I get my hands dirty?! Any applicable magazine, book or ....??

07-23-2002, 12:44 AM
Hmm, there's a few good books out there on DHTML/Javascript. O'Reilly's DHTML reference springs to mind quite quickly, but really they guides, special editions etc only show a limited number of examples or "tricks" (;) ) Your best bet is with script libraries, http://www.dynamicdrive.com http://www.javascript.internet.com both of these have a fair number of editable scripts. For an online JavaScript reference, I find that devguru.com is hard to beat (http://www.devguru.com/Technologies/ecmascript/quickref/javascript_index.html) they also have a CSS (style sheets) reference, although this is a bit outdated (http://www.devguru.com/Technologies/css/quickref/css_index.html). At devguru (http://www.devguru.com) they also have tutorials to learn about some of the common internet languages.

For a really good series of tutorials, http://www.dansteinman.com/dynduo/ is fantastic although quite nerdy.

There's a lot of reading there I know, most of the devguru.com stuff is really like a javascript dictionary, tutorials can be found anywhere on the net, and javascript snippets at dynamicdrive or javascript.internet.com are easily configured and implemented.

Hope this helps


07-23-2002, 12:32 PM
Thanx martin, you're cool, I'm gonna take a look at them....