Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Noobie question - screen redraw stuff

    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?

    Cheers,
    Nick

  • #2
    Regular Coder
    Join Date
    Apr 2005
    Location
    Texas
    Posts
    448
    Thanks
    24
    Thanked 63 Times in 63 Posts
    I would recommend that you try ajax to only modify the form and leave the page the same. Do you have that capability?

  • #3
    Regular Coder
    Join Date
    Apr 2005
    Location
    Texas
    Posts
    448
    Thanks
    24
    Thanked 63 Times in 63 Posts
    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';">

  • Users who have thanked blaze4218 for this post:

    nadamp (09-27-2011)

  • #4
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.

  • #5
    Regular Coder
    Join Date
    Apr 2005
    Location
    Texas
    Posts
    448
    Thanks
    24
    Thanked 63 Times in 63 Posts
    AJAX is a little more advanced than the onload event, but when your ready you'll find plenty of help here


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •