Feedback Print

Events

Scriptcase uses the events to enable the developer to customize the application code. Using the events you can program custom actions at a specific execution time (e.g. After a record is inserted, when it is loaded, upon submitting a form, …) and for a specific application type. In the event areas you can use global and local variables, JavaScript, CSS, HTML, PHP codes and also Scriptcase macros.

onApplicationInit

This event occurs only once, when the application is loaded and before the application executes the SQL. It can be used for data processing or checking variables.

Example: if ([glo_var_dept] != ‘financial’){ sc_redir(app_x.php); }

onScriptInit

This event occurs when the application scripts are started. It runs before the OnLoad events(when present), however, it will always be executed when running, reloading or navigating the application.

onRefresh

This event runs when the refresh option of the application is enabled.

onSave

This event runs when the application saves the record.

onValidate

This event runs when validating the information of the fields, when submitting the form.