zoukankan      html  css  js  c++  java
  • AjaxUploader使用:JavaScript APIs

    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(){}

  • 相关阅读:
    使用Dapper参数化查询(三) IN 查询
    cs窗体继承问题
    SVN使用教程总结(转载)
    celery——使用
    celery——简介及安装
    luffy——django中使用redis
    redis——redis入门(常用数据类型:l )
    redis——redis入门(二)
    redis——redis入门(常用数据类型:string hash)
    redis——redis入门(一)
  • 原文地址:https://www.cnblogs.com/AngelLee2009/p/2200421.html
Copyright © 2011-2022 走看看