I liked the idea so much, that I took the script and
upgraded pimped it.
What it does?
The function simply adds a notification on top of the form, like in the picture below.
You can add multiple notifications with different icons.
Update or delete previously added notifications or add new ones. This image shows (after Name onChange event) changed error text, updated third notification to info style and a new warning. Compare it with previous picture.
How to use it?
Step 1: Insert this code into form OnLoad event.
Step 2: Run the following function when there is a need for a notification.
addNotification(string message, int messageType, string notificationId)
- message – Notification message displayed
- messageType – Type of the notification (the icon) (1 – critical, 2 – info, 3 – warning, 4 – delete the notification)
- notificationId – Any string that identifies specific notification. If a function is called later with existing notificationId, the notification will be updated. Otherwise a new notification is added at the bottom of the list. If you want to delete a specific notification, just set messageType = 4 and use correct notificationId.
Thanks again to Marco Amoedo.
Originally published by Dejan Dular