1.全局的事件
CuteWebUI_AjaxUploader_OnInitialize Fires when an Ajax Uploader is fully initialized.(当一个Ajax Uploader被完全初始化时触发)
CuteWebUI_AjaxUploader_OnStart Fires when an upload of a specific file has started.(当一个特定的文件开始上传时触发)
CuteWebUI_AjaxUploader_OnStop Fires when upload is stopped and not do postback.(当上传停止时并且没有回发时触发)
CuteWebUI_AjaxUploader_OnPostback Fires before the page do PostBack to server side and fire the FileUploaded event.(当页面回发前触发,并且触发FileUploaded事件)
CuteWebUI_AjaxUploader_OnBrowse Fires when the upload button is clicked.(当上传按钮点击时触发)
CuteWebUI_AjaxUploader_OnSelect Fires when files are selected.(文件被选中时触发)
CuteWebUI_AjaxUploader_OnProgress Fires when new information about the upload progress for a specific file is available.(上传进度信息可用时触发)
CuteWebUI_AjaxUploader_OnQueueUI Fires when the upload queue table is available.(当上传队列表可用时触发)
Example:
<script type="text/javascript">
//Fires when an Ajax Uploader is fully initialized
function CuteWebUI_AjaxUploader_OnInitialize() {
var hidden = this;
var arr = [];
for (var p in hidden.internalobject) {
arr.push(p);
}
alert(arr);
}
//Fires when an upload of specific file has started
function CuteWebUI_AjaxUploader_OnStart() {
var hidden = this;
hidden.internalobject.insertBtn.style.display = 'none';
}
//Fires when upload is stopped and not do postback
function CuteWebUI_AjaxUploader_OnStop() {
var hidden = this;
hidden.internalobject.insertBtn.style.display = '';
}
//Fires before the page do PostBack to server side and fire the FileUploaded event.
function CuteWebUI_AjaxUploader_OnPostback() {
var hidden = this;
hidden.internalobject.insertBtn.style.display = '';
}
//Fires when the upload button is clicked
function CuteWebUI_AjaxUploader_OnBrowse() {
}
//Fires when files are selected
function CuteWebUI_AjaxUPloader_OnSelect(files) {
var name = files[0].FileName;
var size = files[0].FileSize;
}
//Fires when new infomation about the upload progress for a specific file is available.
function CuteWebUI_AjaxUploader_OnProgress(enable,filename,begintime,uploadedsie,totalsize) {
var hidden = this;
if (enable) {
if (totalsize) {
document.title = filename + " - " + Math.floor(100*uploadedsie/totalsize)+'%';
}
}
return false;
}
//Fires when the upload queue table is available
function CuteWebUI_AjaxUploader_OnQueueUI(list) {
var name = list[0].FileName;
var size = list[0].FileSize;
var stat = list[0].Status;
var func = list[0].Cancel;
}
</script>
2.单一控件事件
Var hidden = document.getEmementById('<%= Uploader1.ClentID %>');
Hidden.handlebrowse = function(){}