Alert message at a certain condition

Is there any way to get an alert message box at a certain condition. There is an option for this under o-click. but I want at a condition.
And I know there is a way get message in component option description area. but I am looking for a popup message box similar to on click alert.
Looking for suggestions.

Im quite sure there is no way other than using onclick, as with redraw and set functions.
However im interested if this isnt the case.