Setting up JavaScript
You can add JavaScripts to your document. You can also insert JavaScripts in the head section pane of the document window to allow a script to be executed while the visible section of the document is still being loaded.
To set up a JavaScript: - Do any of the following:
- To add a JavaScript to the body section of a page, drag the JavaScript icon
from the Basic tab of the Objects palette to your document window. - To add a JavaScript to the head section of a page, drag the Script icon
from the Head tab of the Objects palette to the document window or the head section pane.
- If it's not already selected, select the JavaScript icon
in the document window, or the Script icon in the head section pane. - In the Inspector, enter a descriptive name in the Name text box. Choose a target browser from the Language pop-up menu. The language version corresponding to your browser selection appears in the text box below the menu.
- To reference an external script file (which must have the .js extension), select Source and do one of the following:
- Enter a resource locator for your script file.
- Click the Browse button to select a script.
- Drag from the pick whip in the Inspector to a script in the site window.
|