-
29 Apr 2012 10:26 PM #1
Ext.Msg.show - How determine what was clicked?
Ext.Msg.show - How determine what was clicked?
Hi!
I`d like to answer a user for confirmation wiyh this code:
I tried to make function like this:Code:{Ext.Msg.show({ title:'Logout', msg: 'Do you really want to logout?', buttons: Ext.Msg.YESNOCANCEL, icon: Ext.Msg.QUESTION, fn: function() { location.replace='http://....';// fire it if was pressed YES button } });}
but it doesn`t workCode:fn: function(btn) { if (btn == 'yes') { //redirect... } }
So how can I built this function?
Thank)
-
29 Apr 2012 11:05 PM #2
hope it helps you..
handler: function () {
Ext.Msg.confirm('',' Are you sure want to log off?', function(btn, text){
if (btn == 'yes'){
// redirect......
}
});
}
-
29 Apr 2012 11:13 PM #3
Thank you, but it doesn`t work too...
Maybe there are another ways to solve this problem?
-
29 Apr 2012 11:18 PM #4
Ok)
I did it!
Here is solution if you need:
Code:{Ext.Msg.show({ title:'Logout', msg: 'Do you really want to logout?', buttons: Ext.Msg.YESNO, icon: Ext.Msg.QUESTION, fn: function(btn) { if(btn == 'yes') location.href='http:/...'; } });}


Reply With Quote