Hi,
If you are also using a CallbackPanel like the sample does, then all you need to do is to place your dialog inside the CallbackPanel. Otherwise you will need to change function OnProgress to something like this:
Code: JavaScript
function OnProgress(progressBar)
{
var extraData = progressBar.getExtraData();
if (extraData)
{
.....
//Close the dialog when the task is done
if (extraData == "The task is done!")
eo_GetObject("Dialog1").close();
}
}
Note you can pass any value to the client to indicate the progress bar is done, as long as your client side code knows what your server side code is passing. For example, the demo page passes "The task is done!" from the server and the client side code checks for this value.
Thanks