Displaying Modal Window Messages in Oracle Forms Using Show_alert

Source: Internet
Author: User

You can display modal windows in Oracle Forms to display normal messages, Error message or asking for confirmation eg.   On deleting a record or saving a record etc. using Show_alert command. These modal window messages can be shown using Alert option in Oracle forms. The shot below for this example:you can download this form from the following LINK:MODAL_MSGT.FMB for This example I has created three alerts with the following names:1. Good_msg 2. Error_msg 3. Ask_alert The following code is written for "Show good Message" button to display a normal Message, you can use this cod E in any plsql block:declare--Create a numeric variable to hold Show_alert return valueNalertbutton number; Begin--Set the message for alertSet_alert_property (' good_msg ', Alert_message_text, ' Records saved successfully. ');--After below statement the execution would hold till you click on OK. Becuase it is an modal windowNalertbutton: = Show_alert (' good_msg ');: alertblock.result: = ' That is a good message. ';--After this can perform any task ...   End; The following code is written for ' Show Error Message ' button to display an error message:declare
--Create a numeric variable to hold Show_alert return value
Nalertbutton number;
Begin
--Set the message for alert
Set_alert_property (' error_msg ', Alert_message_text, ' An error occurred. ');
--After below statement the execution would hold till you click on OK. Becuase it is an modal window
Nalertbutton: = Show_alert (' error_msg ');
: alertblock.result: = ' That is an ERROR message. ';
--After this can perform any task ...
End;
The following code is written for ' Ask confirmation ' button to ask for a confirmation:declare
--Create a numeric variable to hold Show_alert return value
Nalertbutton number;
Begin
--Set the message for alert
Set_alert_property (' Ask_alert ', Alert_message_text, ' Confirm Yes or No ');
--After below statement the execution would hold till you click on OK. Becuase it is an modal window
Nalertbutton: = Show_alert (' Ask_alert ');
--now check which button or answer has been choosen
If Nalertbutton = Alert_button1 Then
: Alertblock.result: = ' you choose Yes. ';
Else
: Alertblock.result: = ' you choose No. ';
End If;
--After this can perform any task ...
End; Subscribe to Get e-mail notifications for Latest Updates like this:

See also http://www.foxinfotech.in/2015/02/using-single-alert-for-messages-and-confirmation-messages.html

Displaying Modal Window Messages in Oracle Forms Using Show_alert

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.