1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    gund is on a distinguished road

      0  

    Default 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:
    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
            }
        });}
    I tried to make function like this:
    Code:
    fn: function(btn) {
    if (btn == 'yes') {
    //redirect...
    }
    }
    but it doesn`t work

    So how can I built this function?
    Thank)

  2. #2
    Sencha User
    Join Date
    Mar 2012
    Posts
    21
    Vote Rating
    0
    nakul_sagar is on a distinguished road

      0  

    Default


    hope it helps you..

    handler: function () {
    Ext.Msg.confirm('',' Are you sure want to log off?', function(btn, text){
    if (btn == 'yes'){
    // redirect......
    }
    });
    }

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    gund is on a distinguished road

      0  

    Default


    Thank you, but it doesn`t work too...
    Maybe there are another ways to solve this problem?

  4. #4
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    gund is on a distinguished road

      0  

    Default


    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:/...'; } });}

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar