SWFUpload:如何取消经典表单的上传
我正在使用经典表单演示。链接是:链接文本
尝试上传文件,可以看到点击“提交申请”按钮后,右上角的蓝色框(指示进度)中没有出现取消(十字图像)按钮。我如何操作现有代码才能看到取消按钮和取消按钮?在上传过程中取消上传吗?
当前的JS代码是:
<script type="text/javascript">
var swfu;
window.onload = function () {
swfu = new SWFUpload({
// Backend settings
upload_url: "upload.php",
file_post_name: "resume_file",
// Flash file settings
file_size_limit : "10 MB",
file_types : "*.*", // or you could use something like: "*.doc;*.wpd;*.pdf",
file_types_description : "All Files",
file_upload_limit : "0",
file_queue_limit : "1",
// Event handler settings
swfupload_loaded_handler : swfUploadLoaded,
file_dialog_start_handler: fileDialogStart,
file_queued_handler : fileQueued,
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
//upload_start_handler : uploadStart, // I could do some client/JavaScript validation here, but I don't need to.
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
// Button Settings
button_image_url : "XPButtonUploadText_61x22.png",
button_placeholder_id : "spanButtonPlaceholder",
button_width: 61,
button_height: 22,
// Flash Settings
flash_url : "../swfupload/swfupload.swf",
custom_settings : {
progress_target : "fsUploadProgress",
upload_successful : false
},
// Debug settings
debug: false
});
};
</script>
谢谢。
I am using the classic form demo. The link is: link text
If you try out the demo & try to upload a file, you can see once you click on the "Submit Application" button, the cancel (cross image) button does not show up in the top right hand corner of the blue box (that indicates the progress). How can I manipulate the existing code to be able to see the cancel button & cancel the upload while it is in progress?
Current JS code is:
<script type="text/javascript">
var swfu;
window.onload = function () {
swfu = new SWFUpload({
// Backend settings
upload_url: "upload.php",
file_post_name: "resume_file",
// Flash file settings
file_size_limit : "10 MB",
file_types : "*.*", // or you could use something like: "*.doc;*.wpd;*.pdf",
file_types_description : "All Files",
file_upload_limit : "0",
file_queue_limit : "1",
// Event handler settings
swfupload_loaded_handler : swfUploadLoaded,
file_dialog_start_handler: fileDialogStart,
file_queued_handler : fileQueued,
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
//upload_start_handler : uploadStart, // I could do some client/JavaScript validation here, but I don't need to.
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
// Button Settings
button_image_url : "XPButtonUploadText_61x22.png",
button_placeholder_id : "spanButtonPlaceholder",
button_width: 61,
button_height: 22,
// Flash Settings
flash_url : "../swfupload/swfupload.swf",
custom_settings : {
progress_target : "fsUploadProgress",
upload_successful : false
},
// Debug settings
debug: false
});
};
</script>
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
调用
swfu
方法cancelUpload
(ref )通过单击按钮或其他方式。Call
swfu
methodcancelUpload
(ref) from a button click or something.