Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The issue is most likely caused by the fact that when you call <code>jQuery.ajax</code> with the <code>async:false</code> option, the AJAX call blocks the GUI thread for the duration of the execution, so the browser can't update the progress bar. You should make your AJAX calls asynchronous, and update the progress bar after each step has succeeded:</p> <p>The simple way:</p> <pre><code>$("#progressbar").progressbar({ value: 0 }); //make first call var tasks = $.ajax({ dataType: "json", url: "http://localhost:8888/chathau5/rest/tasks/list", success:function(data,response) { //first call succeeded tsks = data; $("#progressbar").progressbar({ value: 50 }); //make second call var tasks2 = $.ajax({ dataType: "json", url: "http://localhost:8888/chathau5/rest/tasks/list2", success:function(data,response) { //second call succeeded tsks = data; $("#progressbar").progressbar({ value: 100 }); } }); } }); </code></pre> <p>This solution is far from perfect. It still makes the two AJAX requests sequentially, which is sub-optimal compared to making the requests concurrently. Maybe something like:</p> <pre><code>var $progressbar = $("#progressbar"); var progress = 0; var updateProgress = function(amount) { $progressbar.progressbar({value:progress+=amount}); }; updateProgress(0); $.ajax({ dataType:"json", url:"http://localhost:8888/chathau5/rest/tasks/list", success: function(data, response) { updateProgress(50); } }); $.ajax({ dataType:"json", url:"http://localhost:8888/chathau5/rest/tasks/list2", success: function(data, response) { updateProgress(50); } }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload