show / hide menu

DialogBox

Purpose

The DialogBox function displays a customizable dialog box with a message, title, buttons, and an optional icon. Depending on the specified dialog type, it can be used to display informational messages, alerts, or confirmation dialogs.

Syntax

DialogBox(Message,Optional:Title, DialogType: Message/Alert/Confirm, Button1Title, Optional:Button2Title, Optional:Button3Title, Optional:ImageUrl/Icon, Optional:IconColor, Optional:CssClass)

Arguments

1. Message – The message to be displayed in the dialog box.

2. Title (Optional) – The title displayed in the dialog box.

3. DialogType – Specifies the type of dialog. Supported values are Message, Alert, and Confirm.

4. Button1Title – The caption of the primary button.

5. Button2Title (Optional) – The caption of the second button.

6. Button3Title (Optional) – The caption of the third button.

7. ImageUrl/Icon (Optional) – Specifies the image URL or icon to be displayed in the dialog box.

8. IconColor (Optional) – Specifies the color of the displayed icon.

9. CssClass (Optional) – Specifies a custom CSS class to apply additional styling to the dialog box.

Example

DialogBox(“The selected record contains unsaved changes. Do you want to save before exiting?”, “Confirmation”, Confirm, “Save”, “Don’t Save”, “Cancel”, “fa fa-exclamation-triangle”, “Orange”, “custom-dialog”)

Displays a confirmation dialog titled “Confirmation” with the message “The selected record contains unsaved changes. Do you want to save before exiting?”. The dialog displays an orange Font Awesome exclamation-triangle icon, provides Save, Don’t Save, and Cancel buttons, and applies the custom-dialog CSS class for custom styling.