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!

Hiding a select list option

ZKayFeb 10 2016 — edited Feb 11 2016

Hi,

I have a select list column in a manual tabular form. If I select "GLOBAL" then I can see Hong Kong and Germany in countries drop down.

If I select "EUROPE" in region's drop down then I want to show only Germany in the countries drop down.

I have created a page item "P31_REGION_SELECTED" which gets the value of the selected region by user through the below dynamic action. Then based on the user's selection, Germany is hidden from the drop down. But the problem is that it hides on all rows because I am applying this at class level. Can someone suggest the correct way/syntax to hide the country name for only the row where user selects region as "EUROPE"?

Below is my code for dynamic action:

$x("P31_REGION_SELECTED").value = this.triggeringElement.value;

if ($x("P31_REGION_SELECTED").value == 2) {

     $(".country_class option[value='1']").hide();

} else {

     $(".country_class option[value='1']").unhide();

}

I have also created an example on apex.oracle.com:

https://apex.oracle.com/pls/apex/f?p=30264:31

Workspace: apex2014

User: forum

Password: abc123

Application: 30264

Page: 31

Thanks in advance.

Zkay

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 10 2016
Added on Feb 10 2016
1 comment
778 views