PDA

View Full Version : Loading... During the time webpages load



nigelwong
March 6th, 2006, 02:51
Does anyone know how to "preload" webpages, so when the webpage is loading a "Loading..." message is displayed. When its done, the page will be displayed instnatly? I;'ve seen it been done before, but i cannot find a tutorial on this. Can anyone please point me to one?

Exmaple: www.pageflakes.com see how it works?

Also, does anyone know how to delay image loading (ie. display a Loading... message for a set value, e.g. 5 seconds before the image actually loads).

Thanks!

DarkBlood
March 6th, 2006, 09:51
<body onload="App.startup();">
<div id="Splash">
<img alt="..." src="indicator.gif" />
Loading...
</div>

<div id="PageloadProgress" style="display: none">
<p>
Loading page...</p>
<div id="ProgressHide" onclick="Progress.hide()">
x</div>
<div id="ProgressBar">
&nbsp;</div>
</div>

that source code should help you out.

nigelwong
March 7th, 2006, 00:57
It doesnt work =/

DarkBlood
March 7th, 2006, 09:34
Well then, you must not use Internet Explorer. App. references to the application object. They also don't use any external JS files on that source code... so that won't help you much.

stuffradio
March 7th, 2006, 13:26
It appears to work for me in both IE and FF

DarkBlood
March 7th, 2006, 14:02
No, s/he meant that the div stuff code splice I gave her/him did not work.