设置swfupload选择文件后不自动上传

默认的swfupload选择文件后,会自动开始上传,比较讨厌.因为我需要的还要等表格填完,

提交form的时候一起上传.

呵呵,按如下修改(兼容flash9/10,swfupload2.1.0(beta)/2.2.0):

handles.js

function fileDialogComplete(numFilesSelected, numFilesQueued) { try {    if (numFilesSelected > 0) {     document.getElementById(this.customSettings.cancelButtonId).disabled = false;    }      /* I want auto start the upload and I can do that here */    //comment by it_security

   ////this.startUpload(); } catch (ex) {         this.debug(ex); } }

  

然后在javascript按如下调用即可:

swfu.startUpload();

===========swfu是swfupload对象.

posted @ 2013-06-05 13:16  帅帅~~~  阅读(1064)  评论(0编辑  收藏  举报