Sunday, 3 September 2017

Post Element URL change dynamically and Open the modal Dialog

Hello All,

Today, I am gonna share with you all, How to change the Post Element URL dynamically on the change of items and Open the modal Dialog Page in just 3 simple steps.

1. Pass a static Id in Post Element Text Item

<a id="select_rates" href="...">Select Rates</a>

2.  Create a dynamic action on change and select action Execute PL/SQL code.
BEGIN
:P1566_URL := apex_page.get_url(p_page => '1568'
 , p_items => 'P1568_ST_DATE,P1568_END_DATE,P1568_AGENT_CODE'
                              , p_values => :P1566_ST_DATE||','||:P1566_END_DATE||','||:P1566_AGENT_CODE||','||:P1566_AGENT_CURR
                              , p_clear_cache => '1568');  
END;

Item to submit : P1568_ST_DATE,P1568_END_DATE,P1568_AGENT_CODE

Item to return : P1566_URL

3. Create another dynamic action on change of P1566_URL  and select Execute Javascript Code.

    $('#select_rates').attr('href', $v('P1566_URL'));

Please let me know Incase any of you face any issue or not able to understand above points.

Thank You!

Regards.