Introduction
This post will help you to create a modal dialog page in Apex 4.2 with simple Javascript code.
Scenario:
A modal dialog has to open on button click in Oracle Apex 4.2.
Steps to follow
Step 1:
Create a page
Step 2:
Create a HTML static Region and create a button in that region.
Give a STATIC ID for that region.
Step 3:
On page load the region should be hidden
Create a dynamic action using following steps
- Event – Page Load
- True action – Hide Region
Step 3:
Create a dynamic action to open the HTML static region as Modal dialog using
following steps
- Event – Click
- Selection Type – Button
- Button – Button Name
- Add true action by specifying action as Execute JavaScript
Step 4:
Enter the following JavaScript code
$(‘#STATIC_ID’).dialog({“title”:”Region_Title”, “minheight”:”50%”,
“width”:”40%”, “position”:”auto”});
Example:
$(‘#modal’).dialog({“title”:”cash_payment”, “minheight”:”50%”,
“width”:”40%”, “position”:”auto”})
Call To Action:
For Oracle apex development and customization please do visit our company website https://doyensys.com/
Conclusion
Can create a model dialog page in apex 4.2 using the above javascript code.