PDA

View Full Version : add script tag with the code dynamically to the webpage



bforbhavin
19 Aug 2014, 10:24 AM
How can I add following code dynamically in javascript "script" tag to my webpage using ExtJS? I checked Ext.Loader but didn't find anything to fulfill. Basically, I want to load one dojo module dynamically in my ExtJS code and for that I need to configure following before dojo loader is downloaded using third party url.
dojoConfig = { paths: { 'mixins': location.origin + location.pathname.replace(/\/[^/]*$/, '') + '/app/utils/mixins'} };

Gary Schlosberg
19 Aug 2014, 3:27 PM
Probably not the answer you're looking for, but it seems like loading two libraries would be a lot of overhead. Is the module dojo code doing something that ExtJS cannot?

bforbhavin
20 Aug 2014, 4:27 AM
ArcGIS JS API is tied up with dojo. I am using this api to integrate GIS related functionality. That is the reason I have to develop few custom modules in dojo and load them up with GIS related screens in my ExtJS based product.