📄️ Finishing your web application with JavaScript
You can finish your web application pages by adding JavaScript code. This is a programmer's task and consists of mixing manually coded scripts with code borrowed from selected libraries.
📄️ Promises for asynchronous Javascript
This article explains the idea of promises and tells you why and how to code .then(), .catch() and .finally() clauses in USoft web applications.
📄️ Scripting example 1: The period case
If you want to query data within a period of time, you can for example enter a search condition in a DATE field:
📄️ Scripting example 2: Client-side check on a mandatory field
You can check mandatory columns before saving. Suppose an inserted person record cannot be saved if the Family Name field has no value. In this case, a message must be shown to prompt the user to enter a Family Name:
📄️ Script scope
For a given script, script scope is the collection of classes and object in the application from which the script is available.
📄️ How to add a script to your application
To add a user-defined script that you want to be available from any point in your application:
📄️ How to add a script to a page
Add a script to a specific page class if you know or expect that the script will need to be called from various places on pages based on that page class (or on its descendent classes), but has no wider applicability.
📄️ How to add a script to an object
Add a script to an object if you know or expect that it really belongs to that object and will not need to be callable from any other object in the application.
📄️ Events and event listeners
This article discusses event handling in USoft web applications.
📄️ How to change the parameters of an action
Some actions contain specific parameters. Help about these parameters can be found in the context-sensitive help.
📄️ Host variables in Javascript
There are four methods available to handle hostvars in Javascript:
📄️ The caller keyword
If you want to refer to an event target in a script, you can use the caller keyword. For example: