By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,379 Members | 1,791 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,379 IT Pros & Developers. It's quick & easy.

Delay while page is loading

P: n/a
Hi all,

I've got a script that caches 52 card images and displays the
appropriate card based on user input. It works fine, except when the
page loads for the first time the results are unpredictable until a
few seconds elapse. My guess is that it's taking time to cache the 52
images. Is there any way to delay the loading of the page until all 52
images are cached? Thanks.

dc
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In article <c2**************************@posting.google.com >,
dc*****@rocketmail.com (Donald Canton) writes:
Hi all,

I've got a script that caches 52 card images and displays the
appropriate card based on user input. It works fine, except when the
page loads for the first time the results are unpredictable until a
few seconds elapse. My guess is that it's taking time to cache the 52
images. Is there any way to delay the loading of the page until all 52
images are cached? Thanks.

dc


Put the preloading in a preload page, with a "please wait" message. When the
page is loaded, redirect to the actual page. Or, have the message in a div that
hides the entire page. When the images are loaded, hide the message, thus
displaying the page.
--
Randy
All code posted is dependent upon the viewing browser
supporting the methods called, and Javascript being enabled.
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.