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

Access cq:dialog component properties in js

bangar50
Level 7
Level 7

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
bangar50
Correct answer by
Level 7
Level 7

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
Ankur_Khare
Community Advisor
Community Advisor

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

bangar50
Correct answer by
Level 7
Level 7

Hi ,

     I tried below and it is working for me.

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

 

View solution in original post