Close Modal Dialog When Clicked Outside in Oracle APEX
Modal Dialog page in Oracle APEX by default can be closed my clicking the (x) icon/button on the top right corner of the modal page.
In this post I will be explaining, how to close the modal dialog when clicked outside.
Please follow the below steps to achieve this:
1) Define the following JavaScript function in the Function and Global Variable Declaration section on the parent page (The page from which the modal dialog page is being called/opened).
Note: If you’re going to be using this in more than one place, its better to define it either on the page 0 or in a global JavaScript file.
2) Create an open callback that will trigger the close dialog method when clicking outside the dialog. We have to set call the function when the dialog opens. Define the below code in the Attributes section of the Modal Dialog page.
Click here for DEMO
Happy CODING!!!
Thank you :)
Comments
Post a Comment