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!

Submitting values back to main page from modal window

Wim MeysMay 29 2017 — edited May 31 2017

Hi,

I have an issue with one of my screens.

I need to open a Modal Window on request, do a query there and submit the result back to the main page.

SCENARIO 1:

When I follow this post, it works fine.

https://community.oracle.com/thread/3998578

When I create a button -> Redirect to Page, it works fine.

After the select and submit on my Modal Page, it returns the value to my main page.

However the issue I have here, is that I need to submit 2 values to the Modal Page:

- one static value: P419_SCRIPT_NAME

- a value depending on a select list: P419_NAME

p1.png

But when I use this, the actual selected value isn't submitted to page 498. It's empty (default value).

p2.png

So I tried this.

SCENARIO 2:

I created a button with a dynamic action.

When clicked, it creates the url with PLSQL -> apex_util.prepare_url

DECLARE
l_url VARCHAR2 (4000);
BEGIN
l_url :=
apex_util.prepare_url
(p_url => 'f?p='
|| :app_id
|| ':498:'
|| :app_session
|| '::NO::P498_SERVER_NAME,P498_SCRIPT_NAME:'||:P419_NAME||','||:P419_SCRIPT_NAME
|| ':',
p_checksum_type => 'SESSION');
:P419_DIALOG := l_url;
END;

within that same "click" I then open the modal window with Javascript.

p3.png

Now at least I get my server name in the Modal Window.

But upon select in my Modal Window, my Dynamic Actions doesn't get activated.

p4.png

I notice this, because my alert (only for debug) doesn't kick in.

What I'm looking for is:

- either use the button that calls the Modal Window as in SCENARIO 1, but passes the selected value of Server Name (from select list),

- or SCENARIO 2 where I can trigger the Dialog Closed alert in my main page.

Hope someone can help and point me in the right direction?

Any suggestions are welcome.

cheers Wim

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 28 2017
Added on May 29 2017
11 comments
1,490 views