Return Values
None
Use
Use in Dynamic Server Page components.
Only for use in weboperation and webtrigger definitions.
Description
Use javascript and endjavascript instructions to define a block of JavaScript code that contains one or more JavaScript functions. In this code, you can make use of the Uniface JavaScript API to address and manipulate data, occurrences, and component instances. The JavaScript must conform to the data format described in Data Format of External Client-Side Triggers and Operations.
Uniface treats anything between the javascript and endjavascript instructions as JavaScript, but does not validate it. However, if your JavaScript contains either of these keywords on a separate line, Uniface interprets them as ProcScript instructions and this can result in syntax errors.
Note: Code highlighting is currently not available for JavaScript in the ProcScript Editor. ProcScript keywords and syntax are highlighted wherever they occur, so Javascript code that matches a ProcScript keyword is highlighted, even though it is not ProcScript. This has no effect on compilation.
Parameters for client-side operations and triggers are optional and must be declared in ProcScript preceding the javascript instruction. Variables, however, must be declared in JavaScript.
For more information, see Client-Side Triggers and Operations.
weboperation AlertJS scope input output endscope javascript ; ProcScript instruction, so ProcScript comment can follow alert("THIS IS JAVASCRIPT CODING"); /* JavaScript code, so comment is also JavaScript*/ endjavascript ; ProcScript instruction, so ProcScript comment can follow end ;alert operation
Version | Change |
---|---|
9.5.01 | Introduced |