Scripting
Logi Info lets you take advantage of scripting objects and functions in your Logi applications. These include inline intrinsic functions, JavaScript code embedded in your definitions, and code in external script files.
The following topics describe the Logi elements available for working with scripts in your applications:
- Inline Scripting with "Formula" Attributes
- Scripting with Action.Pre-Action JavaScript
- Scripting with Action.Javascript
- "On Load" Scripting
- Inserting Code Directly
- Scripting within External Files or Third-Party Libraries
- Process Tasks and Script Files
- Debugging Script Files
About Scripting
Developers using Logi products have several different scripting language options available to them:
Script Type | Description |
---|---|
Intrinsic | These built-in script functions are available for use in expressions and embedded script. For more information, see Built in Functions and Operators. |
JavaScript | This is the scripting language default, usingstandard JavaScript syntax. |
VBScript | VB Script has been deprecated - use JavaScript instead for all new applications. |
Where Does Scripting Execute?
It's important to understand where scripts execute in order to get them to work correctly.In the Browser or "Client-Side"
Scripts that execute in the browser, or "client-side", recognize the browser's Document Object Model (DOM) with its Window and Document objects and DHTML events, such as OnClick and OnChange, which occur in the browser. Client-side scripts are useful for calculations, input validation, dynamic page changes, and other activities that do not require an exchange with the web server. This site documents the DOM objects and syntax.
All browsers may not recognize all objects, events, and functions in exactly the same way, so cross-browser testing is highlyrecommended if your users will use a variety browsers and/or browser versions.
On the Server or "Server-Side"
Scripts that execute on the web server, or "server-side", are usually very efficient and secure, but they can't access browser DOM objects or react to user interface events. They may be able to access server system resources, such as files, using special objects and third-party APIs, though this is often considered a security risk.