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

SOLVED

Onclick/Click function in Touch UI by client Lib

ebin_Aby
Level 3
Level 3

how can use onclick /click function in Touch UI by client Lib in AEM6.1

Inline script is working but want to move the js into clientlibs .

Please let me know if it is working with AEM6.3 too.

Code:

HTL 

<button onclick="closeDialog()">X</button>

JS Client lib

function closeDialog() {

alert();

}

1 Accepted Solution
smacdonald2008
Correct answer by
Level 10
Level 10

See this article - it will show you how you can use JS script in an HTL component:

Scott's Digital Community: Creating an AEM HTL component that uses JavaScript

Using this approach - you can tie in JS logic into a front end HTL component!

View solution in original post

1 Reply
smacdonald2008
Correct answer by
Level 10
Level 10

See this article - it will show you how you can use JS script in an HTL component:

Scott's Digital Community: Creating an AEM HTL component that uses JavaScript

Using this approach - you can tie in JS logic into a front end HTL component!