ExtJs 4中 Ext.Ajax.request提交实现waitMsg等待提示效果

//submitForm为form表单 
var myMask = new Ext.LoadMask(Ext.getBody(),{msg:"请稍等,正在导入..."}); 
myMask.show(); 
Ext.Ajax.request({ url:"uploadAction",
 method:"POST", 
params:{
 id:id 
}, 
success:function(){
if (myMask != undefined){ myMask.hide();}
Ext.Msg.alert("消息","文件导入成功!");
 }, 
failure:function(){
if (myMask != undefined){ myMask.hide();}
 Ext.Msg.alert("消息","文件导入失败!"); 
} 
}); 

 

posted @ 2014-10-24 15:39  我爱java2013  阅读(357)  评论(0编辑  收藏  举报