Hey guys,
I'm loading a dynamic application (which takes 20-30 seconds), and I'm trying to create a dynamic progress bar that shows the user how much of the task has been completed dynamically as the page loads.
I'm accomplishing this by setting buffer to false and having my script output a line of JavaScript as it progresses that calls a function to increment the scrollbar:
function progress(percent)
{
$("#progressbar").progressbar({value: Math.round((percent*100))});
}
This is called by a simple function call like progress(15) generated by my page and sent realtime to the browser. Someone suggested on another thread that I could optimize this by attaching the progressbar to a .load() AJAX call, but as far as I know this ONLY returns once the whole page is loaded. Is there any way for me to use some type of asynchronous call to execute the time-consuming code and still be able to display realtime progress as it executes?