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 9089429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:08:47+00:00 2026-06-16T22:08:47+00:00

I have a PHP script that takes around 1 minute 20 seconds to load

  • 0

I have a PHP script that takes around 1 minute 20 seconds to load as it fetches data from other websites. However I need some way to show the user that the page is loading. Something like ‘This page is loading and may take up to 2 minutes’ with a .gif loading images.

I have tried jquery:

    <html>
    <head>
        <script src="http://code.jquery.com/jquery-latest.js"></script>
    </head>

    <body>
    <script>
      // Put an animated GIF image insight of content
      $("#content").empty().html('<img src="http://www.website.com/images/loading.gif" />');

      // Make AJAX call
      $("#content").load("http://website.com/page.php")
      </script>

<div id="content">
Content to load here!
</div>

    </body>
    </html>

But the page is blank (don’t know if i’m implementing something wrong).

Is there any other way of doing so?

I have looked at other questions but can’t find anything that matches what I need, that I can get to work.

Thanks,

Jack.

  • 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-06-16T22:08:49+00:00Added an answer on June 16, 2026 at 10:08 pm

    you got the script tags wrong. you need to close the script with the src call, and open a new one for the actual code

    Also, you need to load the DOM before using JQuery to fetch objects. You can use $(document).ready() or place your script after the DOM element.

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

Sidebar

Related Questions

So basically I have a PHP script that takes all the images from the
I have a php script that inserts data from an Android app into a
I have a PHP script (fetchData.php) that fetches some data and outputs it to
I have a simple PHP mailer script that takes values from a form submitted
I have this small PHP script that takes a POST variable and writes it
I have a php pipe script that receives an email, takes an attached *.csv
I have a php script that grabs links from another website. I am storing
I have a php script that can take anything from 2 to 10 minutes
I have a PHP script that takes about 10 minutes to complete. I want
I currently have a script that takes 1,000 rows at a time from a

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.