3.1 Script Evaluation Order
Unlike conventional JavaScript on web pages, JavaScript that you embed in a Viewsheet is executed as part of the Viewsheet generation process on the server, not the client browser. However, scripts can control client-side interactions through event handlers and hyperlinks.
The overall sequence of Viewsheet script evaluation is as follows.
1. Execute the onInit Handler.
2. Execute the onLoad Handler.
3. Execute all component-level scripts. (See Adding Component Script.)
The onInit Handler executes only once, when the Viewsheet is first loaded. It can be used to initialize variables and define parameters. The onLoad Handler re-executes each time the Viewsheet is refreshed by a user operation.
Component scripts and property expressions are re-executed whenever the particular component is refreshed due to a user operation (on the component itself, or on a related component). Because the order in which individual component scripts are initially executed is not determined, you should avoid setting properties of one element from within a script attached to a different element.
| << 3 Adding Script to a Viewsheet | © 1996-2013 InetSoft Technology Corporation (v11.5) | 3.2 Adding Property Script (Expressions) >> |