View Full Version : preloading script

01-17-2003, 05:53 AM
hello all,

i am using the preload images script from this site with the live update bar ( http://www.javascriptkit.com/script/script2/preloadimage2.shtml , and instead of showing the percentage loaded in the status bar i would like to show it inside the progress bar (i've seen this done b4 somewhere but cant remember where :( ) or underneath the progress bar. something like : xx% Loaded.

also is it possible to postpone the redirection for n seconds ? because my preload is fairly quick and you dont get time to read the page, i would only need to delay the redirection for about 5 secs after the preloading is finished.



01-17-2003, 01:30 PM
to pospone the redirection, you can use setTimeout

function checkLoad() {
if (pending) { changeto(); return }
if (currCount == imgLen) {setTimeout('location.replace(locationAfterPreload)',5000) ; return }

but isn't it a contradiction use a preload script to speed things up and then add an artificial delay?

01-17-2003, 01:46 PM
thank you - works gr8

as 4 the contradiction i really dont like splash pages so i thought i could do something with it behind the scenes and preload my images - but they are optimised and not very large so the message on the splash was flying by.

thanx again