Reputation: 1103
I am using ExtJS framework for a widget. I have written a embedd.js script, that asynchronously loads ext-all.js (combined with other javascript). Finally, it attaches a function to be called for Ext.onReady
However, it does not get called at all using this mechanism. If however, I load the all.js and the css in the element of the page, remaining all things being equal, it works.
How do I solve this?
The code can be seen on:
http://38.109.218.86/cw/works.php
http://38.109.218.86/cw/does_not_work.php
(Not that I am trying to load extjs code itself asynchronously here, so it loads after rest of the page).
Upvotes: 1
Views: 1009
Reputation: 11948
You are throwing a JS error in your not working example
Line 78: Ext.onReady()
If you are loading ExtJS async, then you can only do something like Ext.onReady()
after the library has loaded.
Upvotes: 1