Tuesday, January 29, 2019

Call Dynamic Actions via JavaScript code


Oracle APEX has four dynamic action event types. In this post we will describe how to call dynamic actions of type browser event and custom event via JavaScript .

Call Browser Events(change,click,Keyup,…) below code will call a dynamic action that has been defined for click event on a button with “mybtn” id:

apex.event.trigger('#mybtn','click');

Call dynamic action with custom event:

Create your dynamic action as below:

When->

         Event: Custom

         Custom Event: myEventName

          Selection Type: JavaScript Expression

          JavaScript Expression:document

Client-side Condition->

          JavaScript Expression: document

Then call your dynamic action in JavaScript code as below:    
$.event.trigger(document.'myEventName');

No comments:

Post a Comment