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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:29:20+00:00 2026-06-16T23:29:20+00:00

Problem: I believe that .load is blocking but is intended to be asynchronous. Code:

  • 0

Problem:

I believe that .load is blocking but is intended to be asynchronous.

Code:

$(window).load(function(){
    $('#content').load('/ajax/databaseworking.php');
    setTimeout(function(){ $('#content').load('/ajax/databaseperform.php');}, 5000);
});
</script>

Further Details:

The code basically calls databaseworking.php to do some database maintenance. Every 5 seconds, an ajax call is made to get its progress.

I have checked my logs. databaseworking.php and databaseperform.php are being called. However, databaseperform.php is not being called periodically. In other words, its only being called once.

As a test, I commented out the databaseworking call. This lead to the the progress function being called per interval as intended. This makes me believe that there is a problem with load. Note I have checked and tested databaseworking.php and there shouldnt be an error in there.

  • 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-16T23:29:21+00:00Added an answer on June 16, 2026 at 11:29 pm

    setTimeout will only run once. I believe you wanted to use setInterval which is a recurring timer

    Reference: https://developer.mozilla.org/en-US/docs/DOM/window.setTimeout

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

Sidebar

Related Questions

NOTE: I do believe that this is not an openCV related problem but since
THIRD EDIT: I now believe that this problem is due to a SOAP version
I believe my problem stems from my use of weights and the RelativeLayout that
I believe my problem involves pointers, a concept I often struggle with, but here's
I have a problem with some code and I believe it is because of
I have 5 tables in MySQL, but i believe this is a SQL problem
Problem: Been struggling to get my code to load external shaders and it is
I have a problem with libPNG, which is leading me to believe that I
(I believe this is the same problem as this one , but there's no
If you load codeigniter's date helper, there will be the function local_to_gmt() but it

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.