PDA

View Full Version : messagebox



proofmoore
17 Mar 2011, 5:04 AM
var msg = function(title, msg){
Ext.Msg.show({
title: title,
msg: msg,
minWidth: 200,
modal: true,
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});

}

i want to do something when user clicks the OK button in this messagebox. i dont know how to do it.
i tried to write my own button like


var msg = function(title, msg){
Ext.Msg.show({
title: title,
msg: msg,
minWidth: 200,
modal: true,
icon: Ext.Msg.INFO,
buttons: new Ext.Button({
text: 'OK',
handler:function(){
alert('ok');
}
})
});
}

but this time the button doest show up

Ex_Soft
17 Mar 2011, 5:16 AM
fn (http://dev.sencha.com/deploy/dev/docs/?class=Ext.MessageBox&member=show)