hayageek / jquery-upload-file

jQuery Upload File plugin provides Multiple file Uploads with progress bar.Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.
http://hayageek.com/
MIT License
681 stars 417 forks source link

Progress bar is not showing on IE9 or IE8 #21

Closed authorcode closed 10 years ago

authorcode commented 10 years ago

Progress bar is not showing on IE9 or IE8. Can you help me?

hayageek commented 10 years ago

can you share me your URL?

authorcode commented 10 years ago

Sorry for it. This web application is on the secure portal. I have to create the valid credential to use it.

Give me some time create a demo credential. This time I can share only the code

the following are the references:

<pre>
    <link href="/Styles/jquery-ui.css" rel="stylesheet" type="text/css" />
   <script src="/Jquery/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script src="/Jquery/jquery-ui.min.js" type="text/javascript"></script>
    <script src="/Jquery/jquery.maskedinput-1.3.1.min.js" type="text/javascript"></script>
    <script src="/ZeroClipboard.js" type="text/javascript"></script>
    <script src="/Jquery/jquery.fileupload.js" type="text/javascript"></script>
</pre>

and code is:

var url = "docuploader.ashx" $("#fileuploaderM").uploadFile({ url: "docuploader.ashx", fileName: "myfile", formData: { "type": "M" }, showStatusAfterSuccess: false, showAbort: false, showDone: false, dragDrop: false, showQueueDiv: "progress", showProgress: true, maxFileSize: 1024 * 1024 * 100, onSubmit: function (files) { $("#divprogress").fadeIn(); }, onSuccess: function (files, data, xhr) { // alert(JSON.stringify(data)); // alert(data); document.getElementById("ContentPlaceHolder1_lstmeddocs").innerHTML = data; $("#divprogress").fadeOut(); btnEnabled(); __doPostBack('', ''); } });

'divprogress' contains the 'progress' div where I am showing the progress

let me know if you find anything wrong. thanks

hayageek commented 10 years ago

I dont see uploadfile.css in your code.

https://github.com/hayageek/jquery-upload-file/blob/master/css/uploadfile.css

You are setting showQueueDiv: "progress",

Do you have the below div in your code ?

<div id="progress"></div>
authorcode commented 10 years ago

yes I have like as:

 

Code is working very smooth on the chrome and Mozilla browsers.

I have merge the upload.css in my master stylesheet .css

hayageek commented 10 years ago

If you can share the URL, i can tell you the problem. Otherwise, Create an empty file, add the uploader logic to that. and check whether is showing progress in IE8,IE9. ?

authorcode commented 10 years ago

Hi

Do you able to see the progress bar in the your own demo on the IE 9 and below?

[Only for IE 9 and below] I think it starts with the percentage 2% and goes to 100% directly. I have also checked this behavior on your demo on hayageek.com.

Today I have just found that jQuery.form.js uses some feature if the HTML5 like xmlhttprequest that is not supported on the ie 9 and below.

see the jQuery.form.js:

if (options.uploadProgress) { // workaround because jqXHR does not expose upload property s.xhr = function() { var xhr = $.ajaxSettings.xhr(); if (xhr.upload) { xhr.upload.addEventListener('progress', function(event) { var percent = 0; var position = event.loaded || event.position; /event.position is deprecated/ var total = event.total; if (event.lengthComputable) { percent = Math.ceil(position / total * 100); } options.uploadProgress(event, position, total, percent); }, false); } return xhr; }; }

That's why the code is not able to show the exact progress bar in the IE 9...

please take a look..

hayageek commented 10 years ago

Hiredra, IE8,IE9 dont not support XHR2. So form.js uses iframe technique to upload the files. So for IE8,IE9 you can not get the progress.

On Thu, Jun 26, 2014 at 1:13 PM, Hirendra Sisodiya <notifications@github.com

wrote:

Hi

Do you able to see the progress bar in the your own demo on the IE 9 and below?

[Only for IE 9 and below] I think it starts with the percentage 2% and goes to 100% directly. I have also checked this behavior on your demo on hayageek.com.

Today I have just found that jQuery.form.js uses some feature if the HTML5 like xmlhttprequest that is not supported on the ie 9 and below.

see the jQuery.form.js:

if (options.uploadProgress) { // workaround because jqXHR does not expose upload property s.xhr = function() { var xhr = $.ajaxSettings.xhr(); if (xhr.upload) { xhr.upload.addEventListener('progress', function(event) { var percent = 0; var position = event.loaded || event.position; /event.position is deprecated/ var total = event.total; if (event.lengthComputable) { percent = Math.ceil(position / total * 100); } options.uploadProgress(event, position, total, percent); }, false); } return xhr; }; }

That's why the code is not able to show the exact progress bar in the IE 9...

please take a look..

— Reply to this email directly or view it on GitHub https://github.com/hayageek/jquery-upload-file/issues/21#issuecomment-47196683 .

authorcode commented 10 years ago

Yes.. I was also saying same thing...

Okay any way...Thanks a lot.

Should we close this thread?. I think It would be better if we mark open this issue so that future users can get this information also.

hayageek commented 10 years ago

OK.

On Thu, Jun 26, 2014 at 6:57 PM, Hirendra Sisodiya <notifications@github.com

wrote:

Yes.. I was also saying same thing...

Okay any way...Thanks a lot.

Should we close this thread?. I think It would be better if we mark open this issue so that future users can get this information also.

— Reply to this email directly or view it on GitHub https://github.com/hayageek/jquery-upload-file/issues/21#issuecomment-47224942 .