- bootbox.alert(message, callback)
- bootbox.prompt(message, callback)
- bootbox.confirm(message, callback)
The only required argument for alert calls is message; callback is required for confirm and prompt calls in order to determine what the user’s response was. Even when calling alert a callback is useful to determine when the user dismissed the dialog since our wrapper methods can’t and don’t block like their native counterparts: they are asynchronous rather than synchronous.
Each of these three methods calls a fourth public method which you too can use to create your own custom dialogs: bootbox.dialog(options).
In this blog post de bootbox.dialog is used. Bootbox can be downloaded from GitHub.
Bootstrap Plugins in XPages
Part I : Bootstrap-select - A jQuery plugin that utilizes Bootstrap's dropdown.js
Part II : Bootstrap FileStyle - Customization of input file for Bootstrap
Part III : Dialog Boxes using Bootbox
Below a description of the setup of the Bootbox plugin.
2. AMD Fix
B. Select Open With - Client/Server JS Editor
C. Remove in the third script line 'define.amd' and replace it with 'false'
3. Sample Code Setup Bootbox Dialogs
More information and examples: Bootbox
Recommended Blog Posts:
Bootstrap JS Modal plugin in XPages: Introduction
Bootstrap JS Modal plugin in XPages: Stackable Modals using the Bootstrap-Modal jQuery plugin