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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:08:59+00:00 2026-06-11T05:08:59+00:00

We are working on a ProgressBar using Jquery UI. We are facing some problems,

  • 0

We are working on a ProgressBar using Jquery UI. We are facing some problems, that we aren’t getting values from PHP. We are unable to make a numerical loop that can return the value to Ajax based code.

Below is our code:

HTML

<!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<style type="text/css">
  #bardivs {
   width:400px; /* or whatever the of the porgress bar is */
  /* 
   The position of #bardivs must be something other than
   static (the default) so that its children will be positioned
   relative to it.
   */
  position:relative;
  }
 #progresstext {
position:absolute;
top:0;
left:0;
}
 </style>
  <script>
  var url = "http://localhost/sample/data.php";
 $(function() {
  var progress = 0;
 //alert("some value" + value, value);
$("#progressbar").progressbar({ progress: 0 });
  setTimeout(updateProgress, 500);
 });
 function updateProgress() {
var progress;
$.get(url, function(data) {
    // data contains whatever that page returns     
    if (data < 100) {
        $("#progressbar").progressbar("option", "value", data);
        $("#progresstext").html("<p>    Loading...<p>");
        setTimeout(updateProgress, 500);
       } else {
        $("#progressbar")
          .progressbar("option", "value", 100);
    }

    }); 
  }
 </script>
</head>
<div id="bardivs">
<div id="progressbar"></div>
<div id="progresstext"></div>
</div>
</html>

We don’t have any idea how can we make the code in PHP use this loading function. It should in a loop.

  • 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-11T05:09:01+00:00Added an answer on June 11, 2026 at 5:09 am

    There is no such progress: 0, the progress is measured by value and you should make the data INT because it comes as string:

    $("#progressbar").progressbar({ value: 0 });
        setTimeout(updateProgress, 500);
    });
    function updateProgress() {
        var progress;
        $.get(url, function(data) {
            // data contains whatever that page returns     
            if (data < 100) {
                $("#progressbar").progressbar({value: parseInt(data)});
                $("#progresstext").html("<p>    Loading...<p>");
                setTimeout(updateProgress, 500);
            } else {
                $("#progressbar").progressbar({value: 100});
            }
        }); 
    }
    

    In php make sure you update the progress based on your scripts

    <?php
         $data = get_progress();
         echo (int)$data;
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on displaying a progress bar using JQuery during a long running
I am using the YUI Progress Bar but I'm having some problems with it.
I'm working on Android application which is taking content from internet using JSON, I
I have developed a GUI that is used to extract some data from a
I'm currently working with progress bars for form uploads using the PHP uploadprogress extension.
Background: I'm trying to write a shell script using php that will automatically checkout
We have designed a Progress bar, using Jquery Ui. we need a program that
I've in the following code the progressbar working on the first page load. after
The visual aspect of the WP7 ProgressBar stops working when the Value exceeds the
Working on a small game using an HTML5 canvas, and javascript. And it's working

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.