PDA

View Full Version : confirm with ok - cancel buttons



michaelc
11 Nov 2009, 5:01 PM
just wondering how can I change a confirm dialog so that the button are ok and cancel
vs. yes and no.



Ext.MessageBox.confirm('title', 'message',function(s){
});


looks like I need to define a messagebox vs. using the shorthand confirm.

evant
11 Nov 2009, 5:07 PM
Confirm is just a shortcut for calling show(), so you can call that and pass in the appropriate options.

VinylFox
11 Nov 2009, 5:38 PM
Just to expand on that answer with an example...


Ext.Msg.show({
title:'Do Something',
msg: 'Ok or Cancel?',
buttons: {yes: 'Ok', no: 'Cancel'}, // or Ext.Msg.OKCANCEL
fn: Ext.emptyFn
});

Gunasekar.Jabbala
21 Mar 2013, 4:35 AM
Hi,

Is there anybody implemented shortcut keys for message box yes, no cancle. like alt+y, alt+n, alt+c. I am having a requirement to achive the same. so any body implemented this feature, please share ur idea.

Thanks in advance

Gunasekar Jabbala