I have page 1 from which I open a modal dialog page - page 2. Now when I close the modal dialog, I want to be redirected to page 3. On page 2 I have a button that has a dynamic action defined where on button click two actions take pace: Page Submit (with an after submit branch out to page 3) and Close dialog. Once I click on the button, dialog closes but the user stays on page 1, not going to page 3.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
If you have branch, you don't need to close dialog..
Another option is to travel through pages using PL/SQL-JS combination that redirects to URL after running code on server.
- create a hidden, unprotected item called P2_TARGET
- create a button with action defined by dynamic action,
add a dynamic action onClick for that button, with two true actions:
a. Execute PL/SQL code, submit P2_Item, return P2_TARGET
declare js_code varchar(4000); begin js_code := REGEXP_REPLACE( APEX_PAGE.GET_URL ( p_page => 3, p_clear_cache => 3, p_items => 'P3_Item', p_values => :P2_Item ) ,'\,this\)' ,q'<,$('#p1Region'))>' -- jQuery of event source ); apex_util.set_session_state('P2_TARGET', js_code); end;
b. Execute Javascript code:
eval($v('P2_TARGET'));
and that's supposed to do the trick