I have a dynamic action with a javascript for loop that is processing perfectly. The problem is that the number of rows could be several hundred. I am trying to create a progress bar (or similar) to show the processing. I tried several solutions from plug-ins to javascript. I even tried using toastr to help display. The problem is that the loop runs and then all the toastr's display at the end. If I use console.log() I see each part of the loop running. I'm trying to do this with something that the user will see. I have even tried a couple of examples using callback and timers but could not get it working. Has anyone a solution to this issue?
Code:
<build array here>
array.forEach(function(idx, index) { // Note: I have tried for loop and forEach
var inv = document.getElementById('f03_'+idx).value;
var own = document.getElementById('f04_'+idx).value;
toastr["info"]("Creating Report for "+inv); // or something similar to a progress bar
print_bulk_active(inv,own);
}
This runs but then the toastr's all come up at the end instead of when processing each item. I've googled about this and read about async and sync and tried using a callback but the same thing happens.
Oracle APEX 5.0.4.00.12
Oracle 11g
Thank you in advance for all assistance.
Lawrence