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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:04:07+00:00 2026-06-13T11:04:07+00:00

I have a html table with tasks and the last column is called status.

  • 0

I have a html table with tasks and the last column is called “status”. I need to do a simple thing, to track the status of each task with the usual way of an animating gif icon if its in progress or an ok check if its done.

I have done this in the past by calling a php script with $.ajax that it was refreshing itself every 1 minute. The script was a PHP script with one query that checked a boolean column. This approach was ok, but even then I knew that this was most probably the dumbest way to do something like this.

I am looking for a more robust way to do this and while I was searching I found this snippet

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

<script type="text/javascript">
$(document).ready(function() {
$.ajaxSetup({ cache: false }); // This part addresses an IE bug.  without it, IE will only load the first number and will never refresh
setInterval(function() {
$('#divToRefresh').load('/path/to/your/php/file/userCount.php');
}, 3000); // the "3000" here refers to the time to refresh the div.  it is in milliseconds.
});
</script>

Something like this could work but how do I stop this refresh if the task was actually finished? Something like “Gaurav Sharma” answer on this post is the way to go?

I am a newbie in Jquery so I would really love to know how would you do something like this, seems a common task so I hesitate to re-invent the wheel by writing 2 pages of code for something that can be done with 5 lines 🙂

  • 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-13T11:04:08+00:00Added an answer on June 13, 2026 at 11:04 am
    var interval = setInterval(function() {
        $('#divToRefresh').load('/path/to/your/php/file/userCount.php');
        if(somecondition){
            clearInterval(interval);
        }
    }, 3000); // the "3000" here refers to the time to refresh the div.  it is in milliseconds.
    

    calling clearInterval(interval) stops the repetition.

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

Sidebar

Related Questions

The html snippet: <table id=project_1> <thead> ... <tr> <form accept-charset=UTF-8 action=/projects/1/tasks class=add-task form-search data-remote=true
I need to keep track of different dates (dynamic). So for a specific Task
I have the following HTML table code: <table> <tr> <th>Time</th> <th>Source</th> <th class=hide-on-phones>Destination</th> <th>Duration</th>
I have module, called parser2, which does parsing from html pages. Everything works perfectly,
I know how to print data from database on html table but i have
I have this html code <table id=rounded runat=server style=position:relative;left:-45px; > <thead> <tr> <th scope=col
I have a task to complete for work. I have a HTML page with
Problem I have various html tables that I need to parse/access from my customers
This is a little hard to explain, but I have an HTML table, full
My task is to create a dynamic table which will be used to compare

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.