-
1 Jun 2012 3:26 AM #1
Hide a message box after a certain time duration
Hide a message box after a certain time duration
Good day everyone,
I'm working with ExtJS 4.1 and I'm trying to write a code to automatically hide an alert message box after a certain time duration.
I typed following code:
Ext.Msg.alert('Error', 'form is not valid');
function hide_message()
{
Ext.MessageBox.hide().defer(5000);
}
hide_message();
but it doesn't work and it raises the following exception:
Uncaught TypeError: Cannot call method 'defer' of undefined
What's the matter with that code, and how can I modify it to reach my goal?
Thanks in advance guys.
-
1 Jun 2012 4:46 AM #2
Code:Ext.Msg.alert('Error', 'form is not valid'); function hide_message() { Ext.defer(function() { Ext.MessageBox.hide(); }, 5000); } hide_message();
-
1 Jun 2012 5:45 AM #3


Reply With Quote