To open a pop-up with an alert message

This function will trigger a pop-up with an alert message and an OK button.

You can use this function to display information to the user, which they need to confirm if they want to continue.

If you need to provide options for the user to choose from, we recommend dialog().

The function can be executed only on the client. Learn more about execution context

If you call this function more than once within the same script, only the last function call will be executed, so the user has only one box to confirm.



More about any >




alert("I am a pop-up. Please click 'OK' to confirm.")

Result: Add the code block to a button, and you'll get a popup with an OK button when clicking on it.

alert("This is the time at this very moment: " + time(now()) + ".")

Result: This is the time at this very moment: 17:18. (will show the exact time when the popup is triggered.

See also

dialog, which pops up a dialog with answer options.

Last updated