View Full Version : Noobie question - screen redraw stuff

09-27-2011, 02:49 PM
Just wondering if it's possible to prevent a page displaying until the content is fully loaded.

I have a form with a load of check boxes that reloads itself on each user click and it would be nice to smooth things out a little, e.g. hold a screenshot of the page until the reload is complete and then instantly show that one.

Stupid question?


09-27-2011, 02:55 PM
I would recommend that you try ajax to only modify the form and leave the page the same. Do you have that capability?

09-27-2011, 02:58 PM
but to answer your first question, you could wrap your content with a div <div id="AllContent" style="display:none"></div> and put the following in your body: <body onload="document.getElementById('AllContent').style.display='inline';">

09-27-2011, 03:29 PM
Hey! That was so quick and it worked first time!

I've got no idea about Ajax - I really ought to look into it - but thanks for that tip.

09-27-2011, 03:34 PM
AJAX is a little more advanced than the onload event, but when your ready you'll find plenty of help here :)