Using an improved JavaScript alert popup in APEX
In APEX it's always possible to throw in a simple alert message for debugging your JavaScript. The alert message itself could be clicked away and would stay away, so it is not very usefull besides displaying a debug message.
More often do you need a user to display a certain message when the user has entered some data or just for displaying some information.
The following steps will let you define your own JavaScript alert model window, with your own message text, button text and it will have the same look and feel as the template for your APEX application.
This alert popup could help you redirect workflow in a screen or just to clarify some steps.
First a simple variant of the alert window
In the Function and Global Variable Declaration add this JavaScript,
and create a Dynamic Action on a button to 'Execute JavaScript Code'.
In the JavaScript code of the Dynamic Action add this code:
BCB_ok ('Here you can have some tekst.<P>'+
'And parhaps some more text.<P>'
);
When pressing the Help button you get the following popup:
An alert window with two buttons
In the Function and Global Variable Declaration add this JavaScript:
On the button add this JavaScript code:
BCB_confirm ('Are you sure you want to submit the data?', 'SAVE');
The user will have this popup:
If the user presses the Yes button, APEX will continue submitting the data into the Page Processing with the request being: SAVE. The No button just closes the popup.
Popup alerts calling eachother
You can even have a popup alert opening another popup window.
In the Function and Global Variable Declaration add this JavaScript:
On the button add this JavaScript code:
BCB_disapprove('How do you want to dissaprove this case?');
The user will have this popup:
On pressing the Disapprove_and_renew button, the current popup closes and a new popup opens:
On pressing the Yes button here, APEX will submitting the data into the Page Processing with the request being: DISSAPROVE_NEW. The No button just closes the popup.
overzicht blogs
Geen reacties
Geef jouw mening
Reactie plaatsenReactie toevoegen