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);
                               }
                         });
                    }
            });
  • 相关阅读:
    微软新一代Surface,该怎么看?
    Windows 8创新之路——样章分享
    微软新一代Surface发布,参数曝光
    从MS Word到Windows Live Writer
    《计算机科学基础》学习笔记_Part 1 Computer and Data
    我看Windows 8.1
    Hyper-V初涉_早期Windows安装虚拟硬件驱动
    2020.09.05【省选组】模拟 总结
    2020.08.15【NOIP提高组】模拟 总结
    2020.08.14【省选B组】模拟 总结
  • 原文地址:https://www.cnblogs.com/bjh1117/p/7008653.html
Copyright © 2011-2022 走看看