When creating a Form, you now have the capability to incorporate HTML5 JavaScript that triggers specific actions during predefined events. These events include:
- On After Print
- On Before Print
- On Before Upload
- On Error
- On Hash Change
- On Load
- On Message
- On Offline
- On Page Hide
- On Page Show
- On Pop State
- On Resize
- On Storage
- On Unload
For practical examples, refer to the ‘Using Javascripts (Examples)’ section. To integrate HTML JavaScript into a Form, follow these steps:
- Open the Form in the Designer.
- From the File menu, choose ‘HTML Window Script.’
- In the HTML window script window, select the desired event from the Event drop-down list.
- Click the ‘Add’ button next to JavaScript.
The JavaScript Editor window will appear.
- Provide a Name and Description for the JavaScript.
- Enter the JavaScript code in the Code area.
- Optionally, select a tag from the drop-down list of Form tags and click ‘Insert Tag’ to add it to the code.
- Once finished, click ‘Save.’
The Behavior Tree in the HTML window script window displays the script’s behavior.