Ext.Ajax.request的waitMsg
var nwin = new Ext.Window({
title: '编辑',
modal : true,
closeAction : 'close',
buttonAlign : 'center',
width : 400,
height : 300,
layout : 'fit',
items: assignmentZDGrid,
buttons: [{text: '确定',handler: function(){
var myMask = new Ext.LoadMask(Ext.getBody(),{
msg: '正在保存,请稍后!',
removeMask: true //完成后移除
});
myMask.show();
var ids="";
var codes="";
for(var i=0;i <assignmentZDGrid.getStore().getCount();i++)
{ var id=assignmentZDGrid.getStore().getAt(i).get("type")+":"+assignmentZDGrid.getStore().getAt(i).get("id");
ids+=id+",";
var code=assignmentZDGrid.getStore().getAt(i).get("codeid");
codes+=code+",";
}
Ext.Ajax.request({
url : './flow/saveProcessorsForCurrent.html',
method : 'POST',
params : {ids : ids,codes : codes},
success : function(response,options) {
var responseArray = Ext.util.JSON.decode(response.responseText);
myMask.hide();
formView.grid.getStore().load();
Ext.Msg.alert('消息',responseArray.msg);
nwin.close();
}
});
}},{text: '取消',handler :function(){nwin.close();}}]
});
转自:http://hi.baidu.com/programerni/item/45b3c8962bf49ade1b49dfbe