var varMessage = Ext.MessageBox.show({
msg: 'Initiating, please wait...',
//title: 'Please wait',
progressText: 'Saving...',
animateTarget: 'btn1',
progress: true,
closable: false,
width: 50,
wait: true,
waitConfig: {
interval: 400,
duration: 2000,
//increment: 2,
text: 'Initiating...',
scope: this,
fn: function() {
//Code for ajax request
Ext.Ajax.request({
url: 'url',
async: false,
//Code for if url successfully done
success: function(response, opts) {
var obj = (response.responseText);
Ext.MessageBox.hide();
//Code for error handling
try {
Ext.Msg.alert('Status', 'Request successfully done .');
} catch(err) {
Ext.Msg.alert('Error', 'Some error occured during execution.<br/></br>' + err);
} finally {}
//Code for error handling
},
//Code for if any error occured during execution
failure: function(response, opts) {
Ext.MessageBox.hide();
Ext.Msg.alert("Error", "Some issue occured during execution on server !");
}
});
}
}
});