View Full Version : ext message box to work like a simple alert

19 Jun 2012, 10:15 AM
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){
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
return true;

Tim Toady
19 Jun 2012, 11:04 AM
You can't halt execution like the native alert box. You need to handle anything that needs to wait in the callback.