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

John-P
Community profile John-P Level 2
Job title here
Location here
6 BADGES
Level 2

Level 2

Learn more
Joined the community 25-08-2017 7:04:10 AM
Offline
Top badges earned by John-P
Customize the badges you want to showcase on your profile
Re: Javascript Functions Running Twice
Avatar
Give Back 10
Level 2
John-P
Level 2

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 1
View profile
John-P
- Adobe Experience Manager
That did the trick. I installed a new instance of AEM, and now everything works correctly. Not sure what the problem was, but it's fixed. Thanks!

Views

1.1K

Likes

0

Replies

0
Re: Adding Large JS Library to an AEM Component
Avatar
Give Back 10
Level 2
John-P
Level 2

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 1
View profile
John-P
- Adobe Experience Manager
Bsloki's answer did the trick! Thanks, everyone, for your input!

Views

983

Likes

0

Replies

0
Re: Adding Large JS Library to an AEM Component
Avatar
Give Back 10
Level 2
John-P
Level 2

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 1
View profile
John-P
- Adobe Experience Manager
Hi -Thanks for the responses. Unfortunately, I haven't been able to resolve my issue yet.I tried putting Material Design into my clientlib/js folder by copying and pasting the entire MD folder structure, and I put the index.js into my js.txt file. I got the package to build (using Maven), but the MD functionality didn't work. I should be able to simply give an HTML element a particular class, and Material Design takes over from there - but only the CSS functionality is working, not the Javascrip...

Views

883

Likes

0

Replies

0
Re: Javascript Functions Running Twice
Avatar
Give Back 10
Level 2
John-P
Level 2

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 1
View profile
John-P
- Adobe Experience Manager
Unfortunately, I can't share it publicly due to internal security rules. I could email it to someone, if that's a possibility.

Views

972

Likes

0

Replies

0
Adding Large JS Library to an AEM Component
Avatar
Give Back 10
Level 2
John-P
Level 2

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 1
View profile
John-P
- Adobe Experience Manager
I have a question about adding a large Javascript library to a component in AEM - specifically, Material Design. So far in my experience with AEM, I've added JS files individually to my clientlib folder, but Material Design has dozens (possibly hundreds) of JS files to control the various components in their design. (Here's their Github for reference.)I tried installing Material Design as a Node package in my clientlib folder, but I couldn't get the package to build after that. Any thoughts on h...

Views

2.2K

Likes

0

Replies

8
Re: Javascript Functions Running Twice
Avatar
Give Back 10
Level 2
John-P
Level 2

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 1
View profile
John-P
- Adobe Experience Manager
Here's my page.html under structure/page: It looks like footlibs is only included once. Is there another place I should look to see?

Views

969

Likes

0

Replies

0
Re: Javascript Functions Running Twice
Avatar
Give Back 10
Level 2
John-P
Level 2

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 1
View profile
John-P
- Adobe Experience Manager
I checked my source code, and I have 12 mentions of clientlibs.js:<script type="text/javascript" src="/libs/granite/ui/components/endor/clientlibs.js"><script type="text/javascript" src="/libs/cq/gui/components/projects/admin/translation/customsearch/pathbrowser/tagspicker/clientlibs.js"><script type="text/javascript" src="/libs/cq/gui/components/common/tagspicker/clientlibs.js"><script type="text/javascript" src="/libs/cq/gui/components/authoring/dialog/policy/clientlibs.js"><script type="text/javascript" src="/apps/granite/emailvalidation/clientlibs.js"><script type="text/javascript" src="/libs/mobileapps/dps/gui/components/dpstext/clientlibs.js"><script type="text/javascript" src="/libs/commerce/gui/components/common/productpicker/clientlibs.js"><script type="text/javascript" src="/libs/commerce/gui/components/common/collectionpicker/clientlibs.js"><script type="text/javascript" src="/libs/commerce/gui/components/common/assetpicker/clientlibs.js"><script type="text/javascript" src="/libs/commerce/gui/components/authoring/editor/clientlibs.js"><script type="text/javascript" src="/libs/commerce/gui/components/authoring/assetfinder/product/clientlibs.js">Not sure if that's working correctly?

Views

974

Likes

0

Replies

0
Re: Javascript Functions Running Twice
Avatar
Give Back 10
Level 2
John-P
Level 2

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 1
View profile
John-P
- Adobe Experience Manager
Ok, when I removed it in footlibs.html my JS no longer worked. It doesn't appear to have been loaded at all.When I removed it in headlibs, my CSS wasn't loaded, and my JS functions still ran twice. =DPutting both mentions back leads to CSS correct but JS functions still twice.

Views

990

Likes

0

Replies

0
Re: Javascript Functions Running Twice
Avatar
Give Back 10
Level 2
John-P
Level 2

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 1
View profile
John-P
- Adobe Experience Manager
Should I take one of those mentions out? I'm not sure if that's the right way to fix the issue.

Views

971

Likes

0

Replies

0
Re: Javascript Functions Running Twice
Avatar
Give Back 10
Level 2
John-P
Level 2

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 1
View profile
John-P
- Adobe Experience Manager
Ok, I have that line in both my headlibs.html and footlibs.html files in my partials folder. Both files say that headlibs will only load the CSS, and that the footlibs will load the Javascript.

Views

972

Likes

0

Replies

0
Re: Javascript Functions Running Twice
Avatar
Give Back 10
Level 2
John-P
Level 2

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 1
View profile
John-P
- Adobe Experience Manager
Yes, I'm using ClientLibs to store my JS. Here's a shot of my project below. I'm not sure if/how they could be getting loaded twice. Where would I look to see if that's the case?

Views

971

Likes

0

Replies

0
Javascript Functions Running Twice
Avatar
Give Back 10
Level 2
John-P
Level 2

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 1
View profile
John-P
- Adobe Experience Manager
Hi all -I'm fairly new to AEM, and have run into an interesting issue. The component I'm building is going to be a financial application that our users fill out. (Think along the lines of filling out an application at a bank to open up a new account.)I've got a couple of Javascript files in the component, and everything was working great yesterday. Then, at some point, all of my JS functions started running twice. I have one function that logs a "Hello World" to the console when the page is load...

Views

2.4K

Likes

0

Replies

15
Likes given to