How to access Oracle Apex variables from Javascript?

I use Oracle APEX, but I donโ€™t know how to access the following variables from an external javascript file, which can be located on the application server or stored in shared components โ†’ Static files.

:APP_ID :APP_PAGE_ID :APP_SESSION 

How can I reference the values โ€‹โ€‹for each of the above from javascript (stored as a static file)?

+7
source share
1 answer

These values โ€‹โ€‹are displayed on the page as hidden elements, such as:

 <input type="hidden" name="p_flow_id" value="4000" id="pFlowId" /> <input type="hidden" name="p_flow_step_id" value="4150" id="pFlowStepId" /> <input type="hidden" name="p_instance" value="6528421540413702" id="pInstance" /> 

so that you can refer to them as:

 $v('pFlowId') // APP_ID $v('pFlowStepId') // APP_PAGE_ID $v('pInstance') // SESSION 

Too bad they are not named the same as the state of the session!

+14
source

All Articles