Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3980994
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:21:24+00:00 2026-05-20T05:21:24+00:00

I want to show the user that the document which he wants to access

  • 0

I want to show the user that the document which he wants to access
is loading and not ready yet.

I want to show the web-page when it is fully loaded.

I use

$(document).ready(function(){});

for document ready. What should I do for my approach?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T05:21:25+00:00Added an answer on May 20, 2026 at 5:21 am

    The first thing to do is ask why the page is so slow to load that you feel you need a loading banner, and to do whatever you can to fix that.

    If you can’t fix that because of the nature of the page in question, the next consideration is making sure that the “Loading” banner only appears for people who have JavaScript enabled (because we’re going to remove it later with JavaScript, so it would be a bit mean to put it there and then not remove it if they don’t have JavaScript). This may be one of the few valid remaining uses of the document.write statement (and only if you’re not using XHTML, because it’s not valid in XHTML):

    <body>
    <script>
    document.write("<p id='loading'>Loading...</p>");
    </script>
    

    …which you’d style with CSS, presumably:

    #loading {
        position:         absolute;
        left:             0px;
        top:              0px;
        background-color: #ddd;
        /* ... */
    }
    

    And then in your ready handler, remove it:

    $('#loading').remove();
    

    If you’re using XHTML (or you just don’t want to use document.write on principle), you can do something similar without document.write, along the lines of:

    <body>
    <script>
        (function() {
            var p = document.createElement('p');
            p.id = 'loading';
            p.innerHTML = "Loading...";
            document.body.appendChild(p);
        })();
    </script>
    

    Live example (Tested on IE6/7/8 on Windows; Safari on Windows; and Chrome, Opera, and Firefox on Linux and Windows.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.Net page that has a script:# var Show; $(document).ready(function () {
I want to a build a website that show the user all videos that
I want to show messagebox to the user, such that the user cannot refuse
I want to show a dialog that will allow the user to select a
I want to show a modal dialog/pop-up window when the user has not filled
I want to know if it is possible that when the user has not
I am doing a big project and I want to show user the information
After the first launch of my app i want to show the user a
Similar to the Simon games of old, I want to show the user a
I use ASP.NET I want to show percentage to user from codebehind while database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.