Create dynamic checkbox with javascript and generate events.
Summary:
Content (required):
I need to create a checkbox list based on some values that an integration returns. I've tried it with Javascript, but I don't know how to make it so that clicking on each of these boxes launches an event to execute an action.
This is the javascript that I have so far that only creates the checkboxes, but I still can't generate events when I want to click.
fn_crearCheckBox(arg1) {
for (var i = 0; i < arg1.length; i++) {
if (arg1[i].FLEX_VALUE_SET_NAME == "9") {
var checkbox = document.createElement('input');
checkbox.type = 'checkbox';
checkbox.id = 'idCheckbox' + i;
Tagged:
1