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

  • 相关阅读:
    SQL SERVER 查询数据库状态
    SQL SERVER 查看数据库执行过哪些语句(SQL历史语句记录)
    SQL SERVER 查看所有触发器
    Delphi XE 错误提示:[DCC Error] E2597...
    SQL SERVER 关于多层嵌套的方法
    Delphi XE System.UITypes 颜色模块 TAlphaColor
    Delphi XE 安卓Web开发 错误:net::ERR_CLEARTEXT_NOT_PERMITTED
    Delphi 错误提示:delphi Unable to create process:请求的操作需要提升
    医学-药物-抗组胺药-依巴斯汀片
    医学-药物-未分类-藿胆滴丸
  • 原文地址:https://www.cnblogs.com/AngelLee2009/p/2200421.html
Copyright © 2011-2022 走看看