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 4 of 4
  1. #1
    New Coder
    Join Date
    Jan 2007
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Displaying 'Loading...' message on page load

    Is there a way to display a 'loading...' message (like the gmail loading message i.e. a hidden div) for non-ajax enabled pages? So I really just want to display this message when the page is loading. I know the user could look at the status bar of their browser to see when the page is loading but I would like to implement some extra feedback.

    This needs to be cross browser compatible.

  • #2
    Senior Coder
    Join Date
    Nov 2006
    Posts
    1,000
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've seen it done by preloading images and putting up a message to that effect.

    http://www.javascriptkit.com/script/.../preloadit.htm

    david_kw
    Last edited by david_kw; 02-08-2007 at 09:31 PM. Reason: fixed link

  • #3
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    The onload event fires after everything inside the page has loaded:

    Code:
    <body onload="document.getElementById('workingBox').style.display = 'none';">
    
    <div id="workingBox" style="display:block"><p>Loading. . .</p></div>
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #4
    New Coder
    Join Date
    Jan 2007
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by chump2877 View Post
    The onload event fires after everything inside the page has loaded:

    Code:
    <body onload="document.getElementById('workingBox').style.display = 'none';">
    
    <div id="workingBox" style="display:block"><p>Loading. . .</p></div>
    This is perfect and exactly what I'm after! Thank you.


  •  

    Posting Permissions

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