Adobe GOLIVE CS2 User Manual page 612

Hide thumbs Also See for GOLIVE CS2:
Table of Contents

Advertisement

You can become familiar with the JavaScript environment in GoLive by entering JavaScript expressions into the
JavaScript Debugger accessed from the Special menu. This window provides a command line you can use to commu­
nicate interactively with the JavaScript engine built into GoLive. For more information on using the JavaScript Debugger,
see the SDK documentation.
See also
"Source preferences" on page 578
To set up a JavaScript
You can add JavaScripts to your document. You can also insert JavaScripts in the head section panel of the document
window to allow a script to be executed while the visible section of the document is still being loaded.
Do any of the following:
1
To add a JavaScript to the body section of a page, drag the JavaScript icon
toolbox to your document window.
To add a JavaScript to the head section of a page, drag the Script icon
toolbox to the document window or the head section panel.
2
If it's not already selected, select the JavaScript icon in the document window, or the Script icon
section panel.
In the Inspector, enter a descriptive name in the Name text box. Choose a target browser from the Language menu.
3
The language version corresponding to your browser selection appears in the text box below the menu.
4
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.
JavaScript Editor toolbar items
When using the JavaScript Editor, you can use the following items on the JavaScript Editor toolbar:
Toggle Error Display button
the syntax of your code, any errors are listed in the error display panel. You can move the cursor where an error is
located in your code by clicking the error in the error display panel.
Check Syntax button
it's not already open) and the cursor is placed where the first error is located in your code.
Show Errors button
Show Warnings button
Toggles the wrapping of source code at the margin of the JavaScript Editor on and off.
Word Wrap button
Numbers button
Shows the code line numbers.
Colorize Code button
Theme menu
Enables you to choose a theme for the current document.
Navigate Through Code menu
Shows and hides a panel in the top section of the JavaScript Editor. After you check
Checks the syntax of your code. If any errors are found, the error display panel opens (if
Shows the number of errors to the right of the button.
Shows the number of warnings to the right of the button.
Turns off the color for all items.
Enables you to navigate through code.
from the Basic tab
from the Head tab
of the objects
ADOBE GOLIVE CS2
603
User Guide
of the objects
in the head

Advertisement

Table of Contents
loading

Table of Contents