infernoz
18 Apr 2012, 1:29 PM
Hello,
I am trying to show a MessageBox at a certain point in my application, and I would like it to automatically close after a certain number of seconds whether a user pressed a button or not. How can this be done in ExtJS 4?
Here is the message box I have, was trying to work with a listener on the MessageBox but that was not working:
Ext.Msg.show({
title:'ABC',
msg: 'DEF',
listeners: {
'afterrender': function() {
//sleep somehow for 3 seconds???
this.destroy();
}
},
animateTarget: submitButton,
icon: Ext.Msg.INFO,
closable: false
});
Also, this message would pop up after I called a store.sync() which initiates an ajax proxy. I would like one message to be returned if the sync succeeds and a different message to pop up if there was an error. I know of the successProperty in the reader of the proxy but not sure if that will help me here.
Thanks,
infernoz
I am trying to show a MessageBox at a certain point in my application, and I would like it to automatically close after a certain number of seconds whether a user pressed a button or not. How can this be done in ExtJS 4?
Here is the message box I have, was trying to work with a listener on the MessageBox but that was not working:
Ext.Msg.show({
title:'ABC',
msg: 'DEF',
listeners: {
'afterrender': function() {
//sleep somehow for 3 seconds???
this.destroy();
}
},
animateTarget: submitButton,
icon: Ext.Msg.INFO,
closable: false
});
Also, this message would pop up after I called a store.sync() which initiates an ajax proxy. I would like one message to be returned if the sync succeeds and a different message to pop up if there was an error. I know of the successProperty in the reader of the proxy but not sure if that will help me here.
Thanks,
infernoz