Ext. ajax. method 1: (marked in red) [javascript] {text: & quot; Delete & quot;, iconCls: & quot; btn-del & quot;, scope: this, handler: function () {varfthis. centerPane.
Today, I am working on Ext. Ajax. request ({});. I think the Mask block is required.
Method 1: (marked with red)
[Javascript]
{
Text: "delete ",
IconCls: "btn-del ",
Scope: this,
Handler: function (){
Var f = this. centerPanel;
Var d = f. getSelectionModel (). getSelections ();
If (d. length = 0 ){
Ext. ux. Toast. msg ("info", "select the record to delete! ");
Return;
}
Var g = Array ();
For (var e = 0; e <d. length; e ++ ){
G. push (d [e]. data. dicId );
}
Ext. Msg. confirm ("confirm information", "Are you sure you want to delete the selected record? ",
Function (h ){
If (h = "yes "){
Ext. getBody (). mask ("Please wait. Deleting...", "x-mask-loading ");
Ext. Ajax. request ({
Url: _ ctxPath + "/system/multiDelDictionary. action ",
Params :{
Ids: g
},
Method: "POST ",
Success: function (I, j ){
Ext. getBody (). unmask ();
Ext. ux. Toast. msg ("operation information", "This numeric dictionary is deleted successfully! ");
F. getStore (). reload ();
},
Failure: function (I, j ){
Ext. getBody (). unmask ();
Ext. ux. Toast. msg ("operation information", "Operation error. Please contact the administrator! ");
}
});
}
});
}
},
Method 2: (marked with red)
[Javascript]
Var myMask = new Ext. LoadMask (Ext. getBody (),{
Msg: 'Saving. Please wait! ',
RemoveMask: true // removed after completion
});
MyMask. show ();
Ext. Ajax. request ({
Url: 'infoplatform/TogBuy! Publish. action ',
WaitMsg: 'releasing ...',
Scope: this,
Success: function (f, o ){
MyMask. hide ();
App. setAlert (true, "test ");
},
Failure: function (f, o ){
MyMask. hide ();
App. setAlert (false, "test ");
}