I have a file upload control. When i upload any file, till the file being uploaded, i want to show "Loading..." below that control. is it possible using Javascript.
You can use this JavaScript library:
http://valums.com/ajax-upload/
It has:
onSubmit: function(id, fileName){},
onProgress: function(id, fileName, loaded, total){},
onComplete: function(id, fileName, responseJSON){},
onCancel: function(id, fileName){},
enough for you to know the status of the file.
It is cross browser capable.
This plugin uses XHR for uploading multiple files with progress-bar in FF3.6+, Safari4+, Chrome and falls back to hidden iframe based upload in other browsers, providing good user experience everywhere.
-
Don't you need the back-end to support progress update in order to display progress bar? – Aleks G Jun 11 '12 at 6:13
-
There's no "right" answer to this question, other than "Yes it is possible." In a monotone voice. So there's no way to say any one or the other library will/can/should/is anything other than an option. 21 views and two close votes, with many duplicate questions. Mm mmm. – Jared Farrish Jun 11 '12 at 6:21
:)
– Jared Farrish Jun 11 '12 at 6:07