Hello,
I am requiring some assistance in creating a function that will be able to look up and return a value based on an ID using javascript.
I am having a user click a checkbox and the checkbox takes this structure:
There are about 20 different checkboxes and the value $statistic_id varies from a value of 1 to 20.
I would like to select the checkbox based on the ID, then find its value, then return its value. How is this possible?
I would really appreciate any sort of assistance you can provide. Thank you!
I am requiring some assistance in creating a function that will be able to look up and return a value based on an ID using javascript.
I am having a user click a checkbox and the checkbox takes this structure:
Code:
<input type="checkbox" value="<?= $statistic_id; ?>" name="<?= $statistic_id; ?>" id="checkbox_data" <?= $i==0 ? 'checked="checked"' : null; ?> /> <label for="checkbox_<?= $statistic_id; ?>"><?= getStatisticFromId ( $statistic_id ); ?></label>
I would like to select the checkbox based on the ID, then find its value, then return its value. How is this possible?
I would really appreciate any sort of assistance you can provide. Thank you!
Comment