Feedback

General Overview

Most Scriptcase applications, with the exception of Tabs and Dashboard applications, have events that can be used to create business rules, validations and changes to the application’s CSS, among other things.

When events are executed?

Each event is executed at a certain moment in the application and has an execution order, for this reason, they have different functions within the creation of a business rule and validations.

They can be triggered automatically, as in the case of the onApplicationInit and onScriptInit events, where they are executed when the application starts. Also, they can be triggered through user interaction, as with the onNavigate and onValidate events, which are executed when browsing the application or submitting a form, respectively.

For information about the timing of events execution or other information, access the documentation of the desired event.

how they work?

By default, the events already have handle for opening <?php and closing ?> of PHP tags, so they are ready to receive PHP code and macros from Scriptcase.

However, it is possible to use other languages in the event, such as JQuery, JavaScript, CSS and HTML. For this, it is necessary to close the PHP tag ?> of the event, so that the code can be added.

Remembering that it is necessary to reopen the event’s PHP tag <?php, otherwise the application will not run correctly.

When closing the PHP tag in a Scriptcase event, the executed language is HTML.

Example of using other languages:

Example of using JavaScript code inside Scriptcase application events