Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

cant load /apps/appname/components/structure/page/x.js in AEM publsher.


Level 4

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"${'x.js'}"/> is not working because eloqua js is returning nothing.

3 Replies


Community Advisor

Please use proxy clientlibs and include using etc./Clientlibs/

check Using Client-Side Libraries


Level 4

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.// 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.


Community Advisor

Please try following steps:

  •     Create a separate javascript file for eloqua script containing the code
  •     Call the above file using dependencies attribute into your clientlib folder



Hope it helps!