当前位置: 代码迷 >> ASP.NET >> Jquery.uploadify在遨游中多选文件上传第一个后停止,IE正常,已经尝试了uploadify.swf?V='+(new Date()).getTim,该如何解决
  详细解决方案

Jquery.uploadify在遨游中多选文件上传第一个后停止,IE正常,已经尝试了uploadify.swf?V='+(new Date()).getTim,该如何解决

热度:10639   发布时间:2013-02-25 00:00:00.0
Jquery.uploadify在遨游中多选文件上传第一个后停止,IE正常,已经尝试了uploadify.swf?V='+(new Date()).getTim
请大家帮忙谢谢,遨游多文件上传不可用只能传成功第一个,就终止了,之后就没响应了,IE8多文件上传好使,该引用的JS都引用了v2.1.4.min.js版本,代码如下:
JScript code
//按钮触发保存文件        function SaveFile() {            var strPath = $("#txtParent_2")();            strPath = '../UserFile/InfoManage/' + strPath;            var strID = $("#txtID").val();            var strUserID = $("#txtUserID").val();            var strCorpCode = $("#txtCorpCode").val();            var strScript = '../CheckCode/FileManage.aspx?Mode=AddFile&DirID='+strID+"&Corp="+strCorpCode+"&UserID="+strUserID;            //'script': '../CheckCode/FileManage.aspx?Mode=AddFile&DirID='+$("#txtID").val(),            $('#uploadify').uploadifySettings('script', strScript);            //'folder': '../UserFile/'+strPath,              $('#uploadify').uploadifySettings('folder', strPath);            $('#uploadify').uploadifyUpload();            document.getElementById('apDiv8').style.display = "none";            document.getElementById('divUpFile').style.display = "none";        }$(document).ready(function() {            $("#uploadify").uploadify({                'uploader': '../../Js/JQuery/uploadify.swf?V='+(new Date()).getTime(),                'height': '26',                'width': '74',                'buttonImg': '../../Images/Manage/xzwj.jpg',                'cancelImg': '../../Images/Manage/cancel.png',                'queueID': 'fileQueue',                //'fileDesc': '*.rar;*.jpg;*.gif',                  //'fileExt': '*.rar;*.jpg;*.gif',                  'sizeLimit': '400097152', //400M                  'auto': false,                'multi': true,                'onError': function(a, b, c, d) {                    if (d.status == 404)                        alert('Could not find upload script.');                    else if (d.type === "HTTP")                        alert('error ' + d.type + ": " + d.status);                    else if (d.type === "File Size")                    { }                 },                'onComplete': function(event, queueID, fileObj, response, data) {                    if (response == "0") {                        alert("上传附件出错,请重试");                        return;                    }                    var strName = fileObj.name;                    /*iNum++;                    var len = fileObj.size;                    len = Math.round(len/1024*100)*0.01;                    var m="KB";                    if(len>1000)                    {len=Math.round(len*0.001*100)*0.01;m="MB";}                    len = len.toString() + m;                    var htm="<div id=\"fileItem"+iNum+"\"><img src=\"../../Images/Manage/fj.jpg\" alt=\"附件\" border=\"0\" />"+fileObj.name+"("+len+")&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:void(0);\" onclick=\"DelFile("+iNum+",'" + escape(strName)+"','../UserFile/"+strID+"')\"><img src=\"../../Images/Manage/sc.gif\" alt=\"删除\" border=\"0\"/></a></div>";                                        $("#fileUploaded").append(htm);*/                    document.getElementById("fileQueue").style.display = "none";                    var txtFileID = $("#txtTmp").val();                    $("#txtTmp").val(txtFileID + "," + response);                    var iTmp = strName.lastIndexOf(".");                    if (iTmp > 0) {                        strName = strName.substring(0, iTmp);                    }                    AddFileInfo(response, strName);                }            });});
  相关解决方案