zhahaman2001 Posted June 17, 2007 Share Posted June 17, 2007 ok i have a page that generates some images... problem is users keep clicking off the page before its done loading and makeing all the images... is there something i can have that will indicate when the page is done loading....like text changeing on the page or something... Quote Link to comment https://forums.phpfreaks.com/topic/55884-page-done-loading/ Share on other sites More sharing options...
deadonarrival Posted June 17, 2007 Share Posted June 17, 2007 This can't be done with PHP, but I'm sure you could get a similar effect when using javascript. Hmm Quick idea: use the onload() function within each image tag. In there add 1 to a total. Once that total matches the number of images on your page (can be set in JS using PHP if you're creating the page dynamically), use the DOM (document.spanname.value='value') to write in a div/span that it is loaded. If that makes sense. Quote Link to comment https://forums.phpfreaks.com/topic/55884-page-done-loading/#findComment-276081 Share on other sites More sharing options...
AndyB Posted June 17, 2007 Share Posted June 17, 2007 Personally, I think you have the wrong approach. Putting the equivalent of "This page will take 20 mminutes to load" is an invitation for your visitors to leave - exactly what's happening now. Consider some different approaches. Find faster coding to generate images; generate smaller images; generate fewer images. Quote Link to comment https://forums.phpfreaks.com/topic/55884-page-done-loading/#findComment-276083 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.