hi:
i have a button called button2 in the html page, i didn't set it to the swfu button_placeholder_id.
now i want to click the button to call the selectFile() of swfu.
but failed.it seems nothing happend.
and i try the button1 click event.
but failed again.the document has not button1 element.
can anybody help me?
var swfu;
window.onload = function () {
swfu = new SWFUpload({
// Backend Settings
upload_url: "upload.aspx",
post_params: {
"ASPSESSID": "<%=Session.SessionID %>"
},
// File Upload Settings
file_size_limit: "100 MB",
file_types: "*.PNG",
file_types_description: "PNG Images",
file_upload_limit: "0", // Zero means unlimited
// Event Handler Settings - these functions as defined in Handlers.js
// The handlers are not part of SWFUpload but are part of my website and control how
// my website reacts to the SWFUpload events.
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 settings
button_image_url: "images/XPButtonUploadText_61x22.png",
button_placeholder_id: "Button1",
button_width: 61,
button_height: 22,
// button_text: '',
// button_text_style: '.button { font-family: Helvetica, Arial, sans-serif; font-size: 14pt; } .buttonSmall { font-size: 10pt; }',
button_text_top_padding: 1,
button_text_left_padding: 5,
// Flash Settings
flash_url: "swfupload/swfupload.swf", // Relative to this file
custom_settings: {
upload_target: "divFileProgressContainer"
},
// Debug Settings
debug: false
});
}
function Button2_onclick() {
swfu.selectFile();
}
October 30, 2009 - 9:35am
Welcome to wonderful secure world of Flash Player 10. Now with manual operations. Click to make your software run. No more automation allowed!!!
Next year, Flash Player 11, bring your pencil and coloring crayons!
-------------------------
Flash Player 10 introduces new "security" features that require the user to click to activate the file dialog. Thus the new flash button in SWFUpload. The selectFile and selectFiles functions are left for those you still wish to only support Flash Player 9 but will probably go away in the next release.