Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Programmatically Click a Checkbox

Avatar

Level 7

I know how to change the rawValue of a checkbox in event code, but it is possible to simulate a click like with a button.

With a button i can do :

Button1.execEvent("click");

to click it and by doing so, the click event code will execute.

When i change the rawValue of a checkbox, the check goes on or off but the change event does not execute. It would be great to not have to duplicate code to have the same effect.

1 Accepted Solution

Avatar

Correct answer by
Level 7

Never mind, solved in record time...sometimes reading the help works

CheckBox1.execEvent("change");

this did the trick, it didn't check the box too, but the code in the change event executed which is what i wanted.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 7

Never mind, solved in record time...sometimes reading the help works

CheckBox1.execEvent("change");

this did the trick, it didn't check the box too, but the code in the change event executed which is what i wanted.