i have long running task that gets called using jquery ajax. i am using the block ui plugin to show \"loading\". is there anyway i can send progress messages back to the
What you are trying to do is something similar to Comet. Traditional ("non-comet") webservers are not designed for this kind of transaction model and is therefore not a desired solution.
My suggestion is to break up the processing in one client request per data source:
function loadData() {
// Each call passes callback(id) as a success handler
fireAsynchronousRequest("source1");
fireAsynchronousRequest("source2");
fireAsynchronousRequest("source3");
}
function callback(var source) {
if (source == "source1") {
updateStatus("Source 1 loaded");
}
else if (source == "source2") {
updateStatus("Source 2 loaded");
}
}
This is an example of an asynchronous solution. You can implement state handling in callback() if you need it to be synchronous.