Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting Select2 value in javascript

Jake4321Aug 16 2021

Hi all,
I have this form on which I have a Select2 plugin LOV and I also have a popup modal form in which I create a new value for the Select2 LOV.
The value is created correctly and I can select it manually from the Select2 LOV but I would like to populate the value on the dialog close event but I cannot this done.
I know the return key is returned correctly from the popup modal form and I can see the value in the Select2 LOV when I select it manually but I just cant seem to be able to populate it thru javascript.
I tried different variations of this but still can't get the Select2 LOV to populate I found on the site below.
alert($v("P40_PRJ_KEY_RETURNED"));
$("P40_PRJ_KEY").val($v("P40_PRJ_KEY_RETURNED")).change();
I am currently working with APEX 19.1 and the APEX plugin version is 3.0.
Any tips, comments suggestions as to how I can get this working are greatly appreciated as usual.
Thanks,
Jake

Version 3.0 of the Select2 APEX plugin is out (0 Bytes)

Comments
Post Details
Added on Aug 16 2021
0 comments
425 views