Welcome Guest Search | Active Topics | Sign In | Register

Progress Bar works well in IE but fails in both Firefox and Chrome. Options
Steve Ford
Posted: Thursday, November 3, 2011 6:47:48 PM
Rank: Newbie
Groups: Member

Joined: 10/22/2011
Posts: 9
I just purchased a license so I could get support for this issue... I have been communicating with support by email.

I am using the free Ajax Progress Bar control. It works well In IE but is failing in Firefox and Chrome for some reason.

The "long processing time" server function is activated from another server-side function using this code...

Code: C#
ltScript.Text = string.Format(@"<script type='text/javascript'>setTimeout(function(){{eo_GetObject('{0}').startTask(); window.location='MyProjects.aspx?show={1}';}}, 100);</script>", progProcess.ClientID, jobkey);


That code is derived from code that you sent me. IThe "window.location=..." statement is added after the "eo_GetObject..." statement in order to accomplish a redirect, which was not working when I used a Response.Redirect at the end of the "long processing time" server function.

It looks to me like the "long processing time" server function...
Code: C#
protected void progProcess_RunTask(object sender, EO.Web.ProgressTaskEventArgs e)

is never called... because I never make it to a break point placed at the very beginning of that function.

I hope you can help me figure out why it works well in IE (ver 9) but not in Firefox (ver 7) or Chrome (ver 15).
eo_support
Posted: Thursday, November 3, 2011 7:03:43 PM
Rank: Administration
Groups: Administration

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

That won't work. You can not change window.location at the same time as you start the progress bar (Progress bar lives one page so you can not go to another page while it's still running). It doesn't even suppose to work in IE.

I assume that you want to go to another page after the progress bar is done. If that's the case, you can take a look of this sample:

http://demo.essentialobjects.com/Demos/Progress%20Bar/Server%20Side%20Task%20-%20Advanced%201/Demo.aspx

This sample passes additional data to the client when calling UpdateProgress inside your RunTask event handler. The client side code then checks for this "additional data" and act accordlying. In your case, you can code your RunTask such that it pass nothing to the client while the progress bar is running and pass the new Url to the client when it's done. The client code can then check this data. If it sees it as not null, set window.location:

Code: JavaScript
function OnProgress(progressBar)
{
    var extraData = progressBar.getExtraData();
    if (extraData)
    {
        //Use setTimeout to delay the redirection code slightly so that
        //the progress bar control can finish cleaning up first
        setTimeout(function()
        {
            window.location = extraData;
        }, 100);
    }
}


Hope this helps. Let us know if you still have any questions.

Thanks!
Steve Ford
Posted: Thursday, November 3, 2011 9:31:57 PM
Rank: Newbie
Groups: Member

Joined: 10/22/2011
Posts: 9
That solved the problem! Thank You Very Much!!!

This is a great control!


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.