I have come across some difficulties in getting my progress bar to get its progress from the Json results and update the progress bar based on a timer check every 10 seconds.
I can create a json result as follows:
{"success":true, "progress":0.2}
I believe the general idea is that I need a task with an interval set to 10sec and a runner to start the task, and when the progress bar starts to work, the runner checks the results from Json and update the progress bar as necessary.
Code so far:
var task = {
run: function(){
},
interval: 10000
}
}
Having said that, I have difficulties:
- How to add a Json part to a task?
- How to update a progress bar with a given Json result?
Many thanks.