Results 1 to 2 of 2

Thread: ext message box to work like a simple alert

  1. #1
    Ext JS Premium Member
    Join Date
    Aug 2009
    Posts
    9
    Vote Rating
    0
      0  

    Question ext message box to work like a simple alert

    i have a function some thing like this,
    the ext message box i wanted to work like a simple alert in javascript. After the user's event the next code should execute( for eg . if you alert('hi'); before the user click 'ok' the nxt line code wont execute, it will be in wait state). this is not happening in ext message box. please help me


    'beforeChangeDate': {
    fn: function( newdate , calobj){
    Ext.MessageBox.show({
    title: 'Info',
    msg: "Changing Date to :" + newdate.format('M-d-Y'),
    buttons: Ext.MessageBox.OKCANCEL,
    iconCls: 'infoIcon',
    fn: function(btn, text){
    if( btn == 'ok'){
    //do event
    return true;
    }
    }
    });
    // after the user event (either Ok or Cancel) i want the control to the following line
    callDataRender();
    return true;
    }
    }

  2. #2
    Sencha Premium User Tim Toady's Avatar
    Join Date
    Feb 2010
    Location
    Pennsylvania
    Posts
    605
    Answers
    67
    Vote Rating
    286
      0  

    Default

    You can't halt execution like the native alert box. You need to handle anything that needs to wait in the callback.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •