This function allows you to show a dialog box to the user with a text message or a question. Users can respond to this message and continue interacting with the application. It can be used for informing the user, collecting input, or displaying important messages.
There are four predefined functions in the doo.alert
namespace:
showSuccess(text, title?,html?)
Show success notification. Use it for success messages to users.
Example:
doo.alert.showSuccess('This is really working out.','Great job!');
showInfo(text, title?, html?)
Show info notification. Use this if you need to share any progress info with the user.
Example:
doo.alert.showInfo('It may take a while.','Warning');
showWarning(text, title?, html?)
Show warning notification.
Example:
doo.alert.showWarning('This is a warning toast message.','Warning!');
showError(text,title?, html?)
Show error notification.
Example:
doo.alert.showError('That did not work.','Oops!');
All four functions in the doo.alert namespace allow text formatting using HTML tags. This enables you to highlight important parts of text or add additional effects.
showQuestion(text,title?)
Show a dialog box with a question to the user.
Example:
doo.alert.showQuestion('Do you want to continue?','Question');