Welcome Guest Search | Active Topics | Sign In | Register

Change Unit transferred in Progresstext Options
Kacha
Posted: Sunday, August 24, 2008 5:12:40 PM
Rank: Newbie
Groups: Member

Joined: 8/11/2008
Posts: 1
Dear Sir
I need to change transferred to Kilobyte or Megabyte How I can do
Thank you
Best Regards
eo_support
Posted: Sunday, August 24, 2008 8:45:24 PM
Rank: Administration
Groups: Administration

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

For that you would need to handle the uploader's ClientSideOnProgress event:

http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.AJAXUploader.ClientSideOnProgress.html

http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Handlers.uploader_progress_handler.html

It will be something like this:

Code: HTML/ASPX
<eo:AJAXUploader ClientSideOnProgress="on_progress" ....>
.....
</eo:AJAXUploader>


Code: JavaScript
function on_progress(uploader, total, received)
{
    if ((total < 0) || (received < 0))
        return;

    //You would then update the progress information in whatever
    //logic you would like. For example:
    var div = document.getElementById("progress_div");
    div.innerHTML = "uploaded " + 
        Math.round(received / 1024 / 1024).toString() + "MB"; 
}


The above code assume you have an DIV element with ID "progress_div" in your page. When the uploader runs, it will call your on_progress handler, which then update the innerHTML of a DIV element you put in your page.

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.