Sencha Premium User
Call Ext.onReady twice
I have a question about Ext.onReady.
My HTML pages are built using different templates (one main template for page header section and many others templates to produce body HTML content for each specific page). In the main (head) template I've my Ext inclusion <script> tags and a call to Ext.onReady to enable common widgets (such as page main menu that is the same for all pages).
Now I'm trying to call Ext.onReady "again" (into the page body templates, it was called in the head section of the document) and apparently seems to work correctly (the result is the "sum" of the execution of the first and second onReady functions).
Thank you for your time
sure you can.
all onReady() does is wait till the DOM is ready, following which it executes the passed function.
if you call onReady() anytime after the DOM is ready, it'll just execute the passed function.
pointless, but harmless.
Ext JS Premium Member
It is posted a long ago, but I would like to make sure one thing. What happens for the execution order. Sequential order guaranteed ? for example below example will always alert xx first ?