Adobe GOLIVE CS2 User Manual page 615

Hide thumbs Also See for GOLIVE CS2:
Table of Contents

Advertisement

To set the JavaScript library preference
1
Do one of the following:
To affect all new pages, set the application JavaScript library preference: Choose Edit > Preferences, and select
Script Library from the list on the left.
To affect all new pages in a site window, set the JavaScript library preference in the site settings: Click the Site
Settings button
in the toolbar, select Script Library from the list on the left, and select Site Specific Settings
on the right.
To set the preference for a single page, open the HTML tab of the Page Inspector.
Use the JavaScript options as follows:
2
To have GoLive write any required JavaScript code into the pages, select Write Code Into Page.
To shift all shared JavaScript to an external JavaScript file, select Import GoLive Script Library. The file is saved to
a folder named Generated Items by default.
If you select the Import GoLive Script Library option, GoLive reacts in one of two ways, depending on whether or
not you have a site document open:
If the site document is open, it will create a library file in a new folder named Generated Items at the root level of
the site folder when you save the page.
If you don't have a site document open in the background when you save the page, GoLive writes the code to a
default library file, which can be found in the Modules/JScripts/GlobalScripts subfolder of the GoLive application
folder.
Note: Selecting the Import GoLive Script Library option in the Preferences or Site Settings dialog boxes does not modify
the Script Library settings for pages that contained preexisting JavaScript. To move code from those pages to the library,
select Import GoLive Script Library in the HTML tab of the Page Inspector for each page.
To rebuild the JavaScript library if it is damaged, click Rebuild in the application JavaScript preferences or in the
3
Site Settings dialog box.
Type a folder name for the JavaScript library and a library name with the suffix .js.
4
Flattening the script library
The external JavaScript library file contains the entire GoLive JavaScript library even if your pages don't use all of the
functions within it. You can flatten the file to remove any JavaScript that is not used in the site. Flattening reduces
the library's file size and decreases its download time. You can manually flatten the library file of a single site, set a
site's Site Upload or Export preferences to automatically flatten the library file, or set the application preferences to
flatten the library file of all sites before upload or during export.
To manually flatten the JavaScript library of a single site
Open a site window and choose Site > Update > Flatten Script Library.
To set a site to flatten the JavaScript library upon upload or export
1
In the Site Settings dialog box, select Upload/Export.
Select Site Specific settings.
2
Select Flatten Script Library and click OK.
3
ADOBE GOLIVE CS2
606
User Guide

Advertisement

Table of Contents
loading

Table of Contents