JavaScript
JavaScript is a widely-used scripting language used to extend HTML with dynamic behavior. Uniface supports the use of JavaScript to implement script modules in Dynamic Server Pages (DSPs), and provides an API for addressing Uniface data objects.
Note: Knowledge of JavaScript is usually required to develop web applications. If you are unfamiliar with JavaScript, you can learn the language using one of the many useful web sites, tutorials, and books about the subject.
You can manipulate objects on the page using JavaScript functions, which may be executed during page loading, or in response to events such as a mouse click or keyboard input. This can make a web page very dynamic.
For example, you can use JavaScript to:
- Generate HTML on the fly as the page loads
- Set and get field values and variables
- Change the values of HTML attributes in response to user interactions
- Load new documents
- Open new browser windows
- Direct documents to named windows or frames
You can add JavaScript to server pages using the <script>
tag in the <head>
element of the server page layout.
To enable you to script client-side behavior for HTML elements bound to Uniface data objects, Uniface provides a JavaScript API. For more information, see APIs: JavaScript.
Uniface JavaScript
Uniface provides its own JavaScript files which are referenced at runtime, the web page generated from a DSP includes a reference to the Uniface JavaScript required for executing code in the browser, including use of the Uniface JavaScript API.
You can control the order in which the JavaScript is loaded. For more information, see Controlling the Load Order of JavaScript and CSS .