PDA

View Full Version : Importing external library into exttop



Luixo
14 May 2013, 1:55 AM
Hello!

I'm trying to modify exttop by adding some modules to the desktop. One of them requires external library with several javascript files, that use each other.
Adding them in desktop.html by <script src="dir/filename.js" type="text/javascript"></script> work just fine but i need to import them in module javascript file, dynamically, when icon is clicked. Is this possible?
I tried
Ext.require('dir/filename'), but one of the library js does not see other one. Also i tried block
requires: ['dir/filename', 'dir/filename2',...], which made the blank screen instead of desktop.

mitchellsimoens
15 May 2013, 4:57 PM
You would have to manually create the <script> element and add it to the document when the module is launched.