Trying to Set an APEX_ITEM.CHECKBOX with JavaScript
728781Oct 21 2010 — edited Oct 21 2010I have a PL/SQL region that gives the user five blank rows. When the user enters an item # I have JavaScript validating the item # against our current product list. If the item # is not found the user has the option of indicating that the item # entered is to become a new item. When this occurs, I want to set a check box in the region to checked.
The check box is created as an apex_item.checkbox and each one (in each row) is given a unique id, i.e. new_item_1, new_item_2, etc. In the JavaScript I can see the value of a specified check box using alert("Check box value is " + $v(new_item_1)); or something similar. However, $s(new_item_1, "CHECKED"); does not set the check box to checked as expected.
What is the proper syntax to "check" a dynamic check box with JS?
Thanks,
Gregory