PDA

View Full Version : Ext.example.msg details (and delay)



onlinesaratoga
24 Apr 2007, 4:34 AM
I love the Ext.example.msg box that drops "out of the sky"!



Ext.example.msg('My Title', 'My Message Here');


I can't find its documentation. Where is it?

(What I am looking to do is adjust the amount of time it is displayed - make it stay longer.)

Thanks for any help.

Animal
24 Apr 2007, 5:02 AM
Looking at the source code of the examples page informs me that it includes "../examples.js"

Ext.example is defined in there. That was easy.

It's not documented, it's not a standard part of Ext.

onlinesaratoga
24 Apr 2007, 8:39 AM
Thanks - right you are. I didn't know that it wasn't a part of Ext, though.

For those that may be interested, I adjusted the code so that I can tell it how long to display. Here are the adjustments:

Examples.js, change line 22 to:


msg : function(title, format,secs){


Examples.js, change line 29 to:


m.slideIn('t').pause(secs).ghost("t", {remove:true});


Then, call the function with the seconds param on the end:


Ext.example.msg('My Title', 'My Message Here',3);

cklester
24 Apr 2007, 7:11 PM
How about a function that can make it drop down, then another function to make it go away (instead of a timed thing). That way, it can be dropped down before an XHR and faded away when the XHR call is complete. :)