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

    Delay HTML rendering

    I'm working on a project for a client that consists basically of an HTML skeleton that references a complex Javascript. The Javascript makes some dozens of calls to several servers to gather the information to display on the page. This process can take an arbitrary amount of time-- from a second or so in local testing to much longer in the "real world."

    The client doesn't want to previous page to disappear and the new page to display until all the information has been gathered. Currently the Javascript is executed with an "onload" directive, but that means the page has already started loading and the browser's going to start rendering.

    Any ideas or techniques I could use to satisfy the client's request?

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Sydney, Australia
    Thanked 662 Times in 651 Posts
    Use Ajax to dynamically rebuild the old page into the new one without loading a new page at all?
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


    Posting Permissions

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