I've wrote a aspx page using EO progress bar control, and this page works fine when i run it directly. but if i open this page by using window.showModalDialog() , when i click "Start" button, it cann't trigger server side task and ClientSideOnTaskDone event be triggered immediately.
follow is the codes:
Code: HTML/ASPX
<script>
function start_progressBar() {
var div = document.getElementById("progressDiv");
div.style.display = "block";
var btn = document.getElementById("btnOK");
btn.disabled = true;
var pb = eo_GetObject("ProgressBar");
pb.startTask();
}
function done_ProgressBar() {
window.close();
}
</script>
<div id="progressDiv" style="display:none">
<eo:ProgressBar ID="ProgressBar" runat="server"
Width="550px" onruntask="ProgressBar_RunTask"
ClientSideOnTaskDone="done_ProgressBar" >
</eo:ProgressBar>
</div>
<input id="btnOK" type="button" onclick="start_progressBar()" value="Start" />
follow is server side task code(C#):
Code: C#
protected void ProgressBar_RunTask(object sender, ProgressTaskEventArgs e)
{
try
{
e.UpdateProgress(5);
SyncUpServer();
e.UpdateProgress(100);
}
catch (Exception ex)
{
ExceptionHandle(ex);
}
}
thanks very much for help!