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!

Using JavaScript condition in JQuery dynamic action selector

CashyJan 27 2016 — edited Jan 27 2016

Hi Guys,

I have a master detail setup on a page.

On the detail section, I have a tabular form.  One of the fields is a select list.  The first record in the select contains the value **Not listed** which has a primary key value of 1.  I have separate region with a simple text field where the user can insert a value into the table if the required value doesn't exist.

I want the text item region to only appear if the value **Not Listed** is selected.

I have managed to get it working when the value is selected by using a dynamic action with a bit of JQuery and JavaScript by setting the ID on the select list to 'create' and having the following in the JavaScript $(this.triggeringElement).val() != 1 in the JavaScript condition of a dynamic action the shows or hides the 'create' region and that works well.

However, if the detail table is empty i.e. before the detail records have been created (nothing selected in the triggering jQuery Selector) the create region is being displayed when I don't want it to.

I presume I need some sort of NVL in the JavaScript condition??

I am using APEX v4.2.

Any advice would be appreciated.

Chris

This post has been answered by fac586 on Jan 27 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 24 2016
Added on Jan 27 2016
5 comments
1,187 views