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?
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.