Standard Alert and Confirmation dialogs

JS extension ui.dialogs.messagebox

The JS extension ui.dialogs.messagebox provides API for creating standard dialog types: alert and confirm (UI module from version 19.0.500).

Connecting at PHP page



  • 4 button variants: OK, Yes, No, Cancel.
  • Several variants for sets of buttons: Ok, Yes, No, Cancel, Ok-Cancel, Yes-Cancel, Yes-No, Yes-No-Cancel.
  • Text for each button can be modified and a custom callback specified.
  • The button is automatically blocked (disabled) to protect from repeated clicking.
  • When a button's callback returns promise, the button is switched to "loading" status.
  • Dialog title support. In this case, buttons become larger and are separated from the content by a line.
  • Custom buttons can be specified instead of standard ones (objects or BX.UI.Button class descendants).
  • The modal mode adds an overlay.
  • Additional passing of options for BX.PopupWindow.


BX.UI.Dialogs.MessageBox.alertAllows to quickly create an advisory dialog.
BX.UI.Dialogs.MessageBox.confirmAllows to quickly create a confirmation dialog.
BX.UI.Dialogs.MessageBox.createGets link to the dialog's object.
BX.UI.Dialogs.MessageBox.showPasses dialog settings.

MessageBox Class

Dialogs can be created via creating a BX.UI.Dialogs.MessageBox class object.

© «Bitrix24», 2001-2023