Welcome Guest Search | Active Topics | Sign In | Register

Help .. can't use the Progress Bar Options
Chinz
Posted: Sunday, September 7, 2008 6:31:28 AM
Rank: Newbie
Groups: Member

Joined: 9/7/2008
Posts: 4
Hi,

I've drag and drop a progress bar into my project and assign start button task and end button task to the progress bar.

I've copy paste all the code to my project but is not running the Run Task handler each time i click on the start button.

is there something else i missing here? I've exactly follow all the coding but the progress bar is not moving.
eo_support
Posted: Sunday, September 7, 2008 6:36:55 AM
Rank: Administration
Groups: Administration

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

You can try two things:

1. Run the sample project first. Once you got that running, you can then compare the sample project and your project;
2. Enable JavaScript debugging on IE. That way if you run into any JavaScript error, you will be prompted;

Thanks
Chinz
Posted: Sunday, September 7, 2008 6:41:29 AM
Rank: Newbie
Groups: Member

Joined: 9/7/2008
Posts: 4
Hi,
Yes, i've tried to run the sample project and it's working. But the sample is running in asc user control and mine is running in vb.aspx, will this cause the problem?

How to i enable javascript debugging? Haven't try that b4 .. i'm using VS2005 btw.
eo_support
Posted: Sunday, September 7, 2008 7:08:27 AM
Rank: Administration
Groups: Administration

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

.ascx and .aspx should not be an issue. As to how to enable JavaScript debugging you can check here:

http://blogs.msdn.com/ie/archive/2004/10/26/247912.aspx

Thanks
Chinz
Posted: Sunday, September 7, 2008 7:16:32 AM
Rank: Newbie
Groups: Member

Joined: 9/7/2008
Posts: 4
Still not working, i've just drag and drop the progress bar and assign the start task button and end task button ... progress bar seem no effect

Here's my code ..
Code: HTML/ASPX
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default3.aspx.vb" Inherits="Default3" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<script type="text/javascript">
function OnProgress(progressBar)
{
	var extraData = progressBar.getExtraData();
	if (extraData)
	{
		var div = document.getElementById("divStatus");
		div.innerHTML = extraData;
	}
}
</script>
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    
        <eo:ProgressBar runat="server" id="ProgressBar1" ShowPercentage="True" IndicatorImage="00060104"
	BackgroundImageRight="00060103" ControlSkinID="None" BackgroundImage="00060101" IndicatorIncrement="7"
	BackgroundImageLeft="00060102" Width="300px" StartTaskButton="btnStart" StopTaskButton="btnStop"
	ClientSideOnValueChanged="OnProgress"></eo:ProgressBar>
        
        <asp:Button ID="btnStart" runat="server" Text="Start" />
        <asp:Button ID="btnStop" runat="server" Text="Stop" />
    </form>
</body>
</html>


Imports System
Imports System.Data
Imports System.Drawing
Imports System.Web
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls

    Partial Class Default3
        Inherits System.Web.UI.Page


        
    Protected Sub ProgressBar1_RunTask(ByVal sender As Object, ByVal e As EO.Web.ProgressTaskEventArgs) Handles ProgressBar1.RunTask
        e.UpdateProgress(0, "Running...")

        Dim i As Integer
        For i = 0 To 99
            'Stop the task as soon as we can if the user has
            'stopped it from the client side
            If e.IsStopped Then
                Exit For
            End If
            'Here we call Thread.Sleep just for demonstration
            'purpose. You should replace this with code that
            'performs your long running task. 
            System.Threading.Thread.Sleep(500)

            'You should frequently call UpdateProgress in order
            'to notify the client about the current progress
            e.UpdateProgress(i)
        Next i

        e.UpdateProgress(100, "The task is done!")
    End Sub
End Class
eo_support
Posted: Sunday, September 7, 2008 7:23:06 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Did you copy "divStatus" into your .aspx page? The sample updates the innerHTML of that DIV element (see code in OnProgress handler) and it doesn't appear you have that in your page. That will certainly cause problem.
Chinz
Posted: Sunday, September 7, 2008 7:31:26 AM
Rank: Newbie
Groups: Member

Joined: 9/7/2008
Posts: 4
Yes .. i've added in .. the divStatus and try again, but still not calling my ProgressBar1.RunTask event.

When click on the start button is not triggering any post back or what ... anything else that i've missed?

Try copy paste the following code and is not working without prompting me error...


Code: HTML/ASPX
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default3.aspx.vb" Inherits="Default3" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<script type="text/javascript">
function OnProgress(progressBar)
{
alert('Start');
	var extraData = progressBar.getExtraData();
	if (extraData)
	{
		var div = document.getElementById("divStatus");
		div.innerHTML = extraData;
	}
}
</script>
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    
        <eo:ProgressBar runat="server" id="ProgressBar1" ShowPercentage="True" IndicatorImage="00060104"
	BackgroundImageRight="00060103" ControlSkinID="None" BackgroundImage="00060101" IndicatorIncrement="7"
	BackgroundImageLeft="00060102" Width="300px" StartTaskButton="btnStart" StopTaskButton="btnStop"
	ClientSideOnValueChanged="OnProgress"></eo:ProgressBar>
        
        <asp:Button ID="btnStart" runat="server" Text="Start" />
        <asp:Button ID="btnStop" runat="server" Text="Stop" />
        <div id="divStatus"></div>
    </form>
</body>
</html>


Code: Visual Basic.NET
Imports System
Imports System.Data
Imports System.Drawing
Imports System.Web
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls

    Partial Class Default3
        Inherits System.Web.UI.Page


        
    Protected Sub ProgressBar1_RunTask(ByVal sender As Object, ByVal e As EO.Web.ProgressTaskEventArgs) Handles ProgressBar1.RunTask
        e.UpdateProgress(0, "Running...")

        Dim i As Integer
        For i = 0 To 99

            If e.IsStopped Then
                Exit For
            End If

            System.Threading.Thread.Sleep(500)

            e.UpdateProgress(i)            
        Next i

        e.UpdateProgress(100, "The task is done!")
    End Sub
End Class
eo_support
Posted: Sunday, September 7, 2008 7:48:37 AM
Rank: Administration
Groups: Administration

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

We are not sure what that can be then, it is most likely have to do with your project since it works fine in our sample project.

We can set up an online meeting through which you can share your desktop with us so that we can take a look of the problem on your machine. However that option is reserved for non-free controls and to users who have already purchased a license. So if you already have a license, please let us know.

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.