Toast/ Popup from Form (PHP) Button

In a form (single-record mode with 2 detail forms) I have a PHP-button that does some stuff. In it I call sc_error_message() and sc_error_exit() once something goes wrong, the point being to alert the user with the info.

Problem is once the button is clicked, I see the execution stops as desired and message shows but SC reloads the form so quickly the message cannot be read.

What’s the right way to implement this. I know SC9 has toasts but this is SC8. Cannot migrate yet.

🚀 Scriptcase 9.12 is now available! Check out the new features here 👉🚀 Next Monday (02/24), Scriptcase 9.12 will be released! Check out the new features before anyone else 👉