Onclick/Click function in Touch UI by client Lib

Avatar

Avatar

ebin_Aby

Avatar

ebin_Aby

ebin_Aby

01-08-2017

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();

}

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

01-08-2017

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!

Answers (0)