icon-arrow icon-check icon-mail icon-phone icon-facebook icon-linkedin icon-youtube icon-twitter icon-cheveron icon-download icon-instagram play close icon-arrow-uturn icon-calendar icon-clock icon-search icon-chevron-process icon-skills icon-knowledge icon-kite icon-education icon-languages icon-tools icon-experience
Werken bij Whitehorses
Blog 12/07/2021

Using an improved JavaScript alert popup in APEX

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.

Integratiespecialist
Michel Vogelpoel /
Integratiespecialist

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

Blog alert
Blog alert

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:

Blog alert

An alert window with two buttons

In the Function and Global Variable Declaration add this JavaScript:

Blog alert

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:

Blog alert

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:

Blog alert

On the button add this JavaScript code:

​BCB_disapprove('How do you want to dissaprove this case?');  

The user will have this popup:

Blog alert

On pressing the Disapprove_and_renew button, the current popup closes and a new popup opens:

Blog alert

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 plaatsen

Reactie toevoegen

Jouw e-mailadres wordt niet openbaar gemaakt.

Geen HTML

  • Geen HTML toegestaan.
  • Regels en alinea's worden automatisch gesplitst.
  • Web- en e-mailadressen worden automatisch naar links omgezet.
Integratiespecialist
Michel Vogelpoel /
Integratiespecialist

Wil je deel uitmaken van een groep gedreven en ambitieuze integratiespecialisten? Stuur ons jouw cv!