doo.alert
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.
Functions
There are four predefined functions in the doo.alert
namespace:
Success
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!');
Info
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');
Warning
showWarning(text, title?, html?)
Show warning notification.
Example:
doo.alert.showWarning('This is a warning toast message.','Warning!');
Error
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.
Question
showQuestion(text,title?)
Show a dialog box with a question to the user.
Example:
doo.alert.showQuestion('Do you want to continue?','Question');