Incorporating a Javascript script library
Using a Javascript script library enables you can share Javascript functions across multiple design elements, such as forms and pages.
You can incorporate the following types of JavaScript script libraries:
Type: |
In the resulting HTML: |
---|---|
Inline |
Inserts a <SCRIPT> tag that is executed when the document is loaded. |
Associated with JS Header object |
Displays within the <HEAD> tag where the JS Header object is executed. |
To incorporate a Javascript script library
- Open the design element you want to add the library to in the Work pane.
- Place the cursor where you want to incorporate the library. For:
- Inline script libraries, click the design element's background
- A script that should be associated with the JS Header object, select JS Header from the Objects list in the Programmer's pane
- Choose Create - Resource - Insert Resource from the menu.
The Insert Resource dialog box displays.
- Select Javascript Libraries from the Resource type list.
- Select the library from the Available resources list and click Ok.
If you created an inline script library, a script icon displays on the design element.
If you created a script library associated with the JS Header object, a button displays in the Programmer's pane labeled with the script library's name.