日期:2014-05-16  浏览次数:20368 次

用过 SWFUpload 这款JS插件的 的进一下 紧急
很奇怪的一个事情
我页面要初始化2个 这样的对象
代码先帖出来吧

<HTML xmlns="http://www.w3.org/1999/xhtml">

<HEAD>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<link media="all" type="text/css" href="${base}/js/swfUpload/rr.css" rel="stylesheet">
<script src="${base}/js/swfUpload/swfupload.js" charset="utf-8"></script>
<script src="${base}/js/swfUpload/handlers.js" charset="utf-8"></script>
<script type="text/javascript">
var imageRAR,xls;

window.onload = function () {
imageRAR = new SWFUpload({
upload_url: "swfUploadRAR.action",
post_params: {"storeId": "${storeId}"},
file_size_limit : "11111 MB",
file_types : "*.rar;*.RAR",
file_types_description : "图片压缩包",
file_upload_limit : "0",
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
button_placeholder_id : "spanButtonPlaceholder",
button_width: 65,
button_height: 65,
button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
button_cursor: SWFUpload.CURSOR.HAND,
flash_url : "/vvMall/js/swfUpload/swfupload.swf",
custom_settings : {
upload_target : "divFileProgressContainer"
},
debug: false
});

xls = new SWFUpload({
upload_url: "swfUploadXLS.action",
post_params: {"storeId": "${storeId}"},
file_size_limit : "11111 MB",
file_types : "*.xls",
file_types_description : "商品EXCEL",
file_upload_limit : "0",
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogCompleteXLS,
upload_progress_handler : uploadProgressXLS,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccessXLS,
upload_complete_handler : uploadCompleteXLS,
button_placeholder_id : "spanButtonPlaceholderXLS",
button_width: 65,
button_height: 65,
button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
button_cursor: SWFUpload.CURSOR.HAND,
flash_url : "/vvMall/js/swfUpload/swfupload.swf",
custom_settings : {
upload_target : "divFileProgressContainerXLS"
},
debug: false
});
};

function fileDialogCompleteXLS(numFilesSelected, numFilesQueued) {

try {
if (numFilesQueued > 0) {
this.startUpload();
}
} catch (ex) {
this.debug(ex);
}
}

function uploadSuccessXLS(file, serverData) {
var report=eval('('+serverData+')');

}

function gotoStep2(){
j("#step1_div").hide();
j("#step1_img").show();
j("#step2_p").show();
j("#step2_div").show();
}
</script>
</HEAD>

<BODY>

<div class="masage_tittle"><h3>从本地导入商品列表</h3></div><br>