Rank: Newbie Groups: Member
Joined: 8/20/2008 Posts: 3 Points: 9
|
i need to implement prograss bar while uploding images. i have one jsp page called uploadphotos, i have one link this <label><a href="#" onclick="imageUploader1.Send();return false;">Upload Photos</a></label></div>
if i need to implement what steps i need to follow.
i had tried like
i had set
1. iu.addParam("SilentMode","true");
2 .i had paste some javascript
function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText) { //Max width of progress bar var progresBarWidth = 200; var progresBar = document.getElementById("ProgressBar"); var progresBarText = document.getElementById("ProgressBarText"); switch(Status) { case "START": //Show progress bar progresBar.style.display = "block"; progresBarText.style.display = "block"; //Set width of progress bar to 0px progresBar.style.width = "0px"; break; case "PREPARE": //Show preparing progress progresBarText.innerText = Status + " " + Math.round(Value/ValueMax*100) + "%"; //Set width of progress bar progresBar.style.width = Math.round(Value/ValueMax*progresBarWidth) + "px"; break; case "UPLOAD": //Show uploading progress progresBarText.innerText = Status + " " + Math.round(Value/ValueMax*100) + "%"; //Set width of progress bar progresBar.style.width = Math.round(Value/ValueMax*progresBarWidth) + "px"; break; case "COMPLETE": //Hide progress bar progresBar.style.display = "none"; progresBarText.style.display = "none"; //Show custom message alert("All images were successfully uploaded."); //Redirect to galery.asp page when upload process is completed //window.location.replace('gallery.asp'); 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; } } </script>
to run progress bar from where i should call that function
please give details steps to implement progress bar.
|
Rank: Advanced Member Groups: Administration
, Member
Joined: 8/3/2003 Posts: 607 Points: 651
|
Hello, Please, read the Adding a Custom Progress Bar article, it will give you general ubderstanding of the task.
Sincerely yours, Dmitry Sevostyanov.
|