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

  • SEARCH
  • Home
  • 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 6778905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:19:19+00:00 2026-05-26T16:19:19+00:00

Please bear with me as I am a newbie when it comes to JQuery

  • 0

Please bear with me as I am a newbie when it comes to JQuery and AJAX. I’ll try to explain what I need in details.

I have a page with a link that redirect to another page on the same domain. What I wanted to do are as follow, in the order that I wrote it.

  1. Trigger ‘Please wait while page is loading’ overlay on the page when the link is clicked
  2. Retain the overlay until the fetched page is fully loaded and then remove it

I assumed that as soon as the page is fetched and loaded, the overlay from the previous page will no longer be visible/valid. But how or when do I create an overlay on the fetched page?

I know that I can use $(document).ready to remove the new overlay on the new page but I am having some difficulties in creating the overlay on the fetched page. In short, how and where do I put the JQuery code to create the overlay on the page so that its triggered before the page is fully loaded. Hope this is not too confusing.

Thanks.

  • 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-26T16:19:20+00:00Added an answer on May 26, 2026 at 4:19 pm

    If you want an overlay on the newly fetched page to be initially visible, then you have to build that overlay into the initial HTML/CSS of the new page. You can then use javascript in $(document).ready() to remove the overlay. You have to do it this way because you cannot run javascript that manipulates the DOM in the new page until it’s fully loaded. It will typically be partially or fully visible before you can run this javascript. So, if you want the initial state that shows in the new page to have the overlay, then you have to bake the overlay right into the HTML/CSS of the new page so as it comes up, that’s how it displays.

    Then, when it loads successfully and the DOM is fully loaded, your code in $(document).ready() will fire which will then remove the overlay.

    For the original page, you can just put up an overlay as soon as the button/link is clicked. It probably won’t stay visible for long as the browser clears the window to prepare for the next page load.

    The only way to seamlessly have an overlay up during the entire process without ever seeing the window clear would be to not every actually load a new page URL. Instead, you’d have to fetch the new content with Ajax and use Javascript to put it into place below the overlay. This, of course, would not result in the URL in the URL bar changing, but would get you the continuous overlay behavior.

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

Sidebar

Related Questions

I'm javascript newbie...please bear with me. Modified some jQuery animation code from w3c tutorial.
I'm a C# newbie, so please bear with me. OK, so I have two
Total newbie here, please bear with me. Building a very small personal app that
I am a beginner in jquery so please bear with me. I have a
I am an iOS newbie, so please bear with me. I have a blank
please bear with my newbie questions.. I was trying to convert PDF to PNG
Please bear with me, newbie just learning the ropes. I am getting the below
I'm kind of a newbie with PHP so please bear with me. I would
(I still feel like a complete newbie in MS Visual environments... so please bear
Please bear with me. I've got the jQuery validation plugin working beautifully in FF,

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.