JQuery uploadify error only on IE
Hi Buddies,
I got the error when I use uploadify only on IE.
the following is my setting
<script type="text/javascript" src="script/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="script/jquery-ui-1.8.5.custom.min.js"></script>
<script type="text/javascript" src="uploadify/jquery.uploadify.js"></script>
$开发者_开发知识库('#upload-upload').uploadify({
'uploader': 'uploadify/uploadify.swf',
'script': 'Upload.ashx',
'cancelImg': 'images/close.png',
'auto': false,
'multi': true,
'queueSizeLimit': 4,
'sizeLimit': 36700160, //35 MB
//'sizeLimit': 4000000,
'buttonImg': 'images/Choose-File.png',
'width': 83,
'height': 23,
'rollover': true,
'displayData': 'speed',
'folder': '/uploads',
'onQueueFull': function (event, queueSizeLimit) {
},
//'onSelectOnce': function (event, data) {
//},
'onAllComplete': function (event, data) {
//Code
}
});
and then I called
$('#upload-upload').uploadifyUpload();
The documentation states that when you are changing the scriptData
in uploadifySettings
that you need to add a third parameter to clear the existing scriptData
object.
Change
$('#upload-upload').uploadifySettings('scriptData', { 'uploadid': temp.uploadid, 'userid': temp.userid });
to
$('#upload-upload').uploadifySettings('scriptData', { 'uploadid': temp.uploadid, 'userid': temp.userid }, true);
Not sure if this is your problem, but at least your call will then follow the documentation.
精彩评论