Welcome Guest Search | Active Topics | Sign In | Register

ProgressBar task not stopping Options
Jimmie
Posted: Monday, January 21, 2008 9:05:33 AM
Rank: Newbie
Groups: Member

Joined: 1/21/2008
Posts: 2
I am starting the PB and it works well. I am also sending info back in the UpdateProgress method to run some javascript.

At the end of the job i want to hide the PB and show another panel. I cannot seem to stop the task.

Can anyone tell me what i doning wrong??


Code: Visual Basic.NET
e.UpdateProgress(0, "Running")

            Do Until fileIsThere = True
                fileIsThere = System.IO.File.Exists(Session("strFilePath").ToString())

                System.Threading.Thread.Sleep(50)
                e.UpdateProgress(i)
                If i = 100 Then
                    i = 0
                End If
                i = i + 1


            Loop
            If System.IO.File.Exists(Session("strFilePath").ToString()) Then
                Session("FileIsThere") = "True"

            End If

            e.UpdateProgress(0, "Complete")

            If (e.IsStopped) Then  'this is always false
                PreviewMultiView.SetActiveView(ApprovalView)
            End If



ClientSideOnValueChanged="xcancel_progressBar"


Code: JavaScript
function xcancel_progressBar()
 {

var pb = eo_GetObject("ProgressBar1");

if (pb.getExtraData()== "Complete")
{
                                                                            
alert("Task Complete"); works
pb.stopTask();???
 document.getElementById("lbViewItem").visible=true;not working
 document.getElementById("ApPanel").visible=true;not working
}
eo_support
Posted: Monday, January 21, 2008 10:41:35 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

There is no need for you to call pb.stopTask because all it does is to flag e.IsStopped on the server side, which in turn tell your server side RunTask to return.

document.getElementById("lbViewItem").visible is wrong. Please refer to DHTML reference as for how to hide a DHTML element.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.