I have an external js file.i called it in main.html like <script type="text/javascript" src="/apps/appname/components/structure/page/x.js"></script>.But cant load it in AEM publsher.In AEM author it is loading to the related js file.Purpose of doing this is I have a java script code for eloqua form submission which is inside main.html.Because of eloqua js is inside main.html as internal js it is affecting to page loading time.So i have to put that js as an external and call.Either this way <div data-sly-use.page="${'x.js'}"/> is not working because eloqua js is returning nothing.
Please use proxy clientlibs and include using etc./Clientlibs/
check Using Client-Side Libraries
I put it under /etc/designs/app/clientlibs and check.but it is showing an error which is _elqQ is not defined.Eloqua.js is calling this Library.//img.en25.com/i/elqCfg.min.js.So that can we get eloqua js outside from main.html ? error is _elqQ is not defined.Note - in this case it is not under apps. so allowproxy:false is okay cas it is not under apps.
Please try following steps:
Hope it helps!
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies