Portal customization - how can I include another .js file from CustomSpace
Best Answer
-
Marc-Andre_Lafleur Customer Adept IT Monkey ✭✭
In my custom.js file, I use this to include other files :
$.getScript("/CustomSpace/CustomTasks/otherfile.js");7
Answers
In my custom.js file, I use this to include other files :
$.getScript("/CustomSpace/CustomTasks/otherfile.js");
I'd almost setup gulp to compile and minify into custom.js instead of that being the source code itself...
For example at the top of in your another.js:
Or in custom.js when loading your another.js:
@Eugene_Rack, answering here instead of PM in case someone else is hitting the same problem.
Please note that the global session variable isn't available before the DOM is loaded so make to wait for it to be ready!
Thanx very much for the reply. Working perfectly. Thanx for all your help looking into this.
Kind regards
Eugene