Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
purush  
#1 Posted : Thursday, August 21, 2008 1:16:13 AM(UTC)
purush

Rank: Newbie

Groups: Member
Joined: 8/20/2008(UTC)
Posts: 3

i need to display progress bar like this.

how to archive like this

"c:\users\...\Crestoc001.jpg"
Time left: 7 sec
Photos left: 3 of 10 (3.26MB)
Upload speed: 15.6 MB/Sec

please give example

i am using javascript


Code:
function ImageUploader1_Progress(Status, Progress, ValueMax, Value, StatusText) {
    //Max width of progress bar 
    var progresBarWidth = 100;
    var progresBar = document.getElementById("ProgressBar");
    var progresBarText = document.getElementById("ProgressBarText"); 
    var prograssstatus = document.getElementById("prograssstatus");  
    var statictext = document.getElementById("imagename"); 
    var imagedis = document.getElementById("imagedis");
    var photosupload = document.getElementById("photosleft");
    var timeleft = document.getElementById("timeleft");
    var uploadspeed = document.getElementById("uploadspeed");
    switch(Status)
    {
        case "START":
            //Show progress bar
            progresBar.style.display = "block";
            progresBarText.style.display = "block";
            //Set width of progress bar to 0px
            prograssstatus.style.width = "0px";
            break;
        case "PREPARE":
           //Show preparing progress 
           
            prograssstatus.style.width = Math.round(Value/ValueMax*progresBarWidth) + "px";
            photosupload.innerText = Status + " "  + Math.round(Value/ValueMax*100) + "%";
            //Set width of progress bar 
            statictext.innerText = StatusText;
            imagedis.src = StatusText;
            uploadspeed.innerText =  Math.round(value / 10485.76) / 100 + " MB/Sec";
            break;
        case "UPLOAD":
            //Show uploading progress 
                                  
            prograssstatus.style.width = Math.round(Value/ValueMax*progresBarWidth) + "px";
            photosupload.innerText = Status + " " + Math.round(Value/ValueMax*100) + "%";
            uploadspeed.innerText =  Math.round(value /10485.76) / 100 + " MB/Sec";
            //Set width of progress bar 
            statictext.innerText = StatusText;
            imagedis.src = StatusText;
            break;
        case "COMPLETE":
            //Hide progress bar
            progresBar.style.display = "none";
            progresBarText.style.display = "none";
            //Show custom message
            alert("All images were successfully uploaded.");
            break;
        case "CANCEL":
            //Hide progress bar
            progresBar.style.display = "none";
            progresBarText.style.display = "none";
            //Show custom message
            alert("Uploading were canceled.");            
            break;
        case "ERROR":
            //Hide progress bar            
            progresBar.style.display = "none";
            progresBarText.style.display = "none";    
            //Show custom message
            alert("Error arrised during uploading.");    
            break;
    }
} 



please give me example



Edited by user Thursday, August 21, 2008 2:56:07 AM(UTC)  | Reason: Not specified

Alex Kon  
#2 Posted : Tuesday, August 26, 2008 8:07:09 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups:
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello,

Unfortunately there is no way to get such params as "Time left" and "Upload speed". As for the rest - take a look at the attached file.
File Attachment(s):
default.zip (2kb) downloaded 15 time(s).
Users browsing this topic
Forum Jump  
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.