JavaScript Files

The UIM SCRIPT element allows events on the page to trigger JavaScript functions. You can simply provide a path to the JavaScript file that is relative to your component folder. For example, if you have a JavaScript file in a sub-folder of your component folder: MyComponent/scripts/myScript.js, you can just refer to this in the SCRIPT tag as follows:

        <SCRIPT SCRIPT_FILE="scripts/myScript.js" ...>

The paths you have specified will be fully preserved during application generation.

JavaScript allows HTML and CSS to be queried and manipulated. The underlying HTML and CSS source code used to style the Cúram application is not documented. No guarantees are made about its stability across Cúram releases. Therefore, custom JavaScript may have to be updated in line with changes to HTML structure.

A number of JavaScript APIs for use in the custom JavaScript code are provided within the Cúram application. They are documented in the following location in your CDEJ installation: CuramCDEJ\doc\Javascript\index.html. Use of any other Cúram JavaScript APIs, discovered through web developer tools for example, is not supported. The same is true of the JavaScript APIs and functions of third party frameworks used within the Cúram application. While there is nothing prevent a developer using these, using them means the code will be impacted by changes to the Cúram application in future releases.

Using the techniques described above to add new JavaScript files to the custom component, new third party APIs could be added to Cúram pages. This is at the customers discretion, as no guarantees can be made on third-party APIs that have not been used and verified within the Cúram application.