M.Eb
M.Eb

Reputation: 23

How to close popup window in Oracle-apex?

I have a page with a PLSQL region that contains an image which is linked to a popup window meaning that when the user clicks on the image the popup window is opened. The popup window has a submit button and I want to close the popup window after the user clicks the submit button. How do I implement that?

Upvotes: 0

Views: 1939

Answers (1)

Jamie Sutcliffe
Jamie Sutcliffe

Reputation: 26

One way is to use a branch of type 'Branch to PL/SQL Procedure' with branch action:

declare
Begin
htp.p('<script>');
htp.p('window.opener.doSubmit("REFRESH");');
htp.p('window.close();');
htp.p('</script>');
end;

Condition when button pressed set to the name of your button. The above code also refreshes the calling page.

Upvotes: 1

Related Questions