0

I'm doing the progress bar in ajax, jquery with php. I need to delay the uploading process file the file is uploaded. Here is my code.

uploadProgress : function(event, position, total, percentComplete) {
        $("#progressbar").width(percentComplete + '%');     
        $("#percent").html(percentComplete + '%');
        if (percentComplete > 50) {
            $("#message").html("<font color='red'>File Upload is in progress .. </font>");
        }
        },

how can i delay the progress bar loading to show the completed percentage? or is there any other solution?

Sadikhasan
  • 18,365
  • 21
  • 80
  • 122
Dhivya Prabha
  • 77
  • 2
  • 8
  • 2
    Isn't it nice if upload is so fast that you can't see the progress bar? I would choose to display a (different) message when uploading is complete, and let the upload itself run as fast as possible. – GolezTrol Jan 24 '15 at 10:55
  • With @GolezTrol 's comment, it is also worth to note that the upload will actually take much more time in a remote server. You must be using your own computer right? – Gogol Jan 24 '15 at 10:58
  • Yes.. Actually I'm asking for a test process.. Weather it is start from 1 to 100 or just ends with 100.. – Dhivya Prabha Jan 24 '15 at 11:15

1 Answers1

0

For testing purposes you can use network throttling in Chrome developer tools (in mobile device emulator mode). Or any of network throttling tools discussed for example in this offtopic question.

UPD: another topic about network throttling.

Community
  • 1
  • 1
Roman Bekkiev
  • 3,010
  • 1
  • 24
  • 31