Feedback Print

Events

Scriptcase has Events to allow the developers to customize the application code. By using the events, the developers 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 events area 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); }

onNavigate

This event occurs when navigating between the application pages.

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.

onRecord

This event is executed at the moment the record line is loading. The OnRecord event is a loop that loads the records by each row.

onHeader

This event runs when the header of the application is loaded.

onFooter

This event runs when the footer of the application is loaded.

Code Editor

Scriptcase code editor is used within events and has a series of shortcuts to help in the applications development.

Scriptcase event editor

At the top section of the editor, there are some options that allows us to change the editor theme or expand it, for example. These options can also be activated using the hotkeys.

  • Full Scream - Increases the area occupied by your code editor.
  • Full Scream - Expand the sides of the code editor.
  • Search - Activates the search in the code editor.
  • Replace - Enables replace in the code editor.
  • Scriptcase event editor - Defines the code editor theme.

The hotkeys are available in all browsers compatible with Scriptcase.

Click Here to view the Scriptcase hotkeys documentation.