Author: andre
Date: 2010-06-30 13:38:35 +0200 (Wed, 30 Jun 2010)
New Revision: 42755
Modified:
openimages/trunk/src/main/webapp/style/js/upload.js
Log:
trying to fix an issue in which Firefox does not show any progress but I have
no idea, other browser seem fine
Modified: openimages/trunk/src/main/webapp/style/js/upload.js
===================================================================
--- openimages/trunk/src/main/webapp/style/js/upload.js 2010-06-30 10:42:25 UTC
(rev 42754)
+++ openimages/trunk/src/main/webapp/style/js/upload.js 2010-06-30 11:38:35 UTC
(rev 42755)
@@ -5,34 +5,34 @@
$(this).submit(function() {
var form = this;
var result = "<div>Uploading...</div>";
+ $(pInfo).html(result);
var i = 0;
var progress = null;
- window.clearInterval(progress);
- progress = window.setInterval(function() {
+ clearInterval(progress);
+ progress = setInterval(function() {
$.ajax({
url: progressUrl,
async: false,
cache: false,
- contentType: 'xml',
error: function(xhr, status, err) {
result = '<div>Error: ' + status + " : " + err +
'</div>';
},
complete: function(data) {
result = data.responseText;
+ //console.log('complete');
if (result.indexOf('100%') > -1 && i == 0) {
- $(pInfo).html("<div>Uploading...</div>");
- } else {
- $(pInfo).html(result);
+ result = "<div>Uploading...</div>";
}
i++;
},
success: function(data) {
result = data.responseText;
- $(pInfo).html(result);
- window.clearInterval(progress);
+ //console.log('success');
}
});
- }, 500);
+ $(pInfo).html(result);
+ //console.log('uploading: ' + i);
+ }, 1000);
});
});
});
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs