What are the different type of alert boxes in Ext JS?
- Ext.MessageBox.alert();
Ext.Msg.alert('Status', 'This is Ext JS message box.');
- Ext.MessageBox.confirm();
Ext.Msg.confirm("Confirmation", "Do you want to Save changes?", function(btnText){ if(btnText === "no"){ Ext.Msg.alert("Alert", "You have confirmed 'No'."); } else if(btnText === "yes"){ Ext.Msg.alert("Alert", "You have confirmed 'Yes'."); } }, this);
- Ext.MessageBox.wait();
var win = Ext.MessageBox.wait('Loading, 'wait');
Ext.Ajax.request({
...
callback: function() {
win.hide();
}
});
- Ext.MessageBox.prompt();
Ext.Msg.prompt("Ext JS Tutorials", "Please enter your Sencha Id:", function(btnText, sInput){ if(btnText === 'ok'){ Ext.Msg.alert("Status", "You entered:" + sInput); } }, this);
- Ext.MessageBox.show();
Ext.Msg.show({
title : 'Save',
msg : 'Do you want to Save the changes? ',
width : 300,
closable : false,
buttons : Ext.Msg.YESNOCANCEL,
buttonText :
{
yes : 'Yes & Continue',
no : 'No & Continue',
cancel : 'Discard'
},
multiline : false,
fn : function(buttonValue, inputText, showConfig){
Ext.Msg.alert('Status', buttonValue);
},
icon : Ext.Msg.QUESTION
});
Comments
Post a Comment