You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Create dynamic checkbox with javascript and generate events.

Accepted answer
21
Views
4
Comments

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:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!