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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:41:55+00:00 2026-05-24T22:41:55+00:00

I want to have a progressbar that take data from server, so I created

  • 0

I want to have a progressbar that take data from server, so I created 2 servlets the first one (process) starts the process and when it ends return the result; the second one (GetEvent) gets progress information from session every 500ms..

All of this works normally and the progress information is displayed correctly, but the
process Servlet’s callback never executes.

 <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>

      <script>
      $(document).ready(function() {
      process();
     $("#progressbar").progressbar({ value: 0 });
         $("#progressStatus").html("");

        getEvent();
      });
      function process()
      {
       $.getJSON("process", function(result){
         //never executed
         alert( "Result: " );

       });
      }
      function getEvent()
      {
        $.getJSON("GetProgressEvent", function(data) {     
        $.each(data.ProgressEvents, function(){
        $("#progressbar").progressbar({ value: this.progress });
         $("#progressStatus").html(this.status);
        });
        });
           setTimeout(getEvent, 500);
      }
      </script>
    </head>
    <body style="font-size:62.5%;">

    <div id="progressbar"></div>
    <div id ="progressStatus"></div>
    </body>
    </html>

I just started with JQuery and I don’t know what’s wrong with this code.

  • 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-24T22:41:56+00:00Added an answer on May 24, 2026 at 10:41 pm

    you are calling $.getJSON with a url “process”
    this function has no error handling if there is problem with the response or invalid JSON is returned then the callback will not be called.

    http://api.jquery.com/jQuery.getJSON/

    jQuery.getJSON( url, [data], [success(data, textStatus, jqXHR)] )

    url A string containing the URL to which the request is sent.

    data A map or string that is sent to the server with the request.

    success(data, textStatus, jqXHR)A callback function that is executed if the request succeeds.

    Try adding a valid url in place of “process” and if that fails use the
    $.ajax method as follows

    $.ajax({
      url: "mydomain.com/url",
      type: "POST",
      dataType: "json",
      data: $.param( $("Element or Expression") ),
    
      complete: function() {
        //called when complete
      },
    
      success: function() {
        //called when successful
     },
    
      error: function() {
        //called when there is an error
      },
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WebView that is loading a page from the Internet. I want
I want to have a select-only ComboBox that provides a list of items for
I want to have a text box that the user can type in that
I want to create a table representing data I have, but I want each
I've got a progressbar in my form that I want to increase the value
I have an issue with javascript/jQuery...I have a web service that will process information
I have a progress bar that I want to change color depending on a
Basic Goal is that i have four progress bar and want to run them
I have a variable in javascript containing a string of XML data that I
I have a process that is doing some heavy maths with gl rather than

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.