zoukankan      html  css  js  c++  java
  • ExtJs的Ext.Ajax.request实现waitMsg等待提示效果

    一、  fp.form.submit 有waitMsg 属性来设置等待效果,如下。但是对于Ext.Ajax.request来说 waitMsg 并不起作用。     
                   fp.form.submit({
                               url : '',
                               waitTitle : "[性别]修改",
                               waitMsg : '正在提交数据,请稍后... ...',
                               success : function(form, action) {
                                         Ext.MessageBox.alert('提示信息',action.result.msg);
                               },
                               failure : function(form, action) {
                                    Ext.MessageBox.alert('提示信息', "更新性别有误!");
                               }
                   });
     
    二、Ext.Ajax.request实现waitMsg等待提示效果
              Ext.MessageBox.confirm('Message', '请问您确定要修改性别吗?', function(btn) {
                     if (btn == 'yes'){
                         var myMask = new Ext.LoadMask(Ext.getBody(), { 
                             msg: '正在提交申请,请稍后!'
                         }); 
                         myMask.show();
                         Ext.Ajax.request({
                               url : '',
                               params : {
                                    sex : sex
                                         },
                               success : function(response,option) {                                           
                                         var res = Ext.decode(response.responseText);
                                         if(res.success){
                                              myMask.hide();
                                              Ext.MessageBox.alert('提示信息', res.msg);
                                         }else{
                                               myMask.hide();
                                               Hs.util.Msg('提示信息', res.msg);
                                         }          
                               },
                               failure : function(form, action) {
                                    myMask.hide();
                                    Hs.util.Msg('提示信息', response.msg);
                               }
                         });
                    }
            });
  • 相关阅读:
    不足百行代码 实体数组转DataTable通用类
    【翻译】WEB安全设计规范(4.1)
    也为读者说几句(兼为什么要骂烂书译者)
    重用之前应仔细分析问题用错轮子有感
    最长代码有多长:不符[单一职责原则(SRP)]的常见设计
    "千里之堤毁于蚁穴"重点项目不能交付之谜(一)泥淖中的验收测试
    企业快速开发框架基于配置文件
    从面试题看高级软件工程师需要哪些技艺
    面试英语【转】
    测试
  • 原文地址:https://www.cnblogs.com/bjh1117/p/7008653.html
Copyright © 2011-2022 走看看