Expand my Community achievements bar.

SOLVED

Access cq:dialog component properties in js

Avatar

Community Advisor

Hi,

     How can we access component cq:dialog properties(name, description) using simple client side  js   .

Using server side js we can able to access easily.

Regards,

Sanjay

        

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi ,

     I tried below and it is working for me.

var titleFromDialog = $(".button-link").val();
console.log(titleFromDialog)

 

View solution in original post

3 Replies

Avatar

Community Advisor

Read the properties in component.html using sightly and keep them as hidden fields and then access in ur js file.

Avatar

Correct answer by
Community Advisor

Hi ,

     I tried below and it is working for me.

var titleFromDialog = $(".button-link").val();
console.log(titleFromDialog)