Javascript - Adobe GOLIVE CS2 User Manual

Hide thumbs Also See for GOLIVE CS2:
Table of Contents

Advertisement

This places the insertion point so that you can enter the attribute value without having to move the cursor to the
desired location.
Selecting text for overtyping is accomplished by enclosing a placeholder word or string within selection characters.
Here is an example:
<macr o na m e="ima g e" typ e="h tml" [CDATA[<im g "sr c=../GIFS/%???%.GIF " wid t h="20"
h e ig ht="20">"\]\]></macr o >
The three question marks enclosed in quotes will be selected when you insert this example macro, allowing them to
be overtyped.
Using keywords as substitutes for control characters in text macros
As already noted, you can use three control characters to specify what happens when a text macro is inserted:
Single quotes ('') mark out a selection.
The vertical bar places the insertion point.
Dollar signs are used to reference another text macro.
Now and then, syntax rules may require that you insert a macro with any of those characters in it. For example, JavaS­
cript syntax requires that text strings be enclosed in single quotation marks. This conflict is solved by substituting
percent signs (or any other suitable character) for single quotation marks. The GoLive Text Macro tool has three
built-in keywords that allow you to redefine control characters:
Selection lets you redefine the selection markers if single quotes are not allowed. Here is an example:
S e le c t io n = %
wr i t e . do c u men t .wr i t e('%w ha t%')
Caret lets you redefine the insertion point marker if the vertical bar is not allowed—for example, because it is used
to express a bitwise OR operation in JavaScript.
CARET = %
Macro lets you redefine the dollar signs enclosing a macro name.
M AC R O = %

JavaScript

Using JavaScript
The GoLive built-in support for JavaScript and JScript lets you add interactivity to your documents, verify form
input, enhance visual displays, and dynamically control the browser. The JavaScript Editor lets you build scripts in
the application, embed them in your document, and test them immediately by launching the targeted browser.
Note: Not all browsers implement JavaScript in the same way. Test all JavaScripts on all of your target browsers.
To make it easy for you to add JavaScript, GoLive provides a complete inventory of building blocks for all major
JavaScript dialects and versions. Whenever you drag a Script icon
panel, you specify the targeted application in the Inspector, which then configures the JavaScript Editor accordingly.
Combined with the ability of JavaScript to identify browsers, this feature makes it easy for you to build documents
with multiplatform support.
from the objects toolbox to the head section
ADOBE GOLIVE CS2
602
User Guide

Advertisement

Table of Contents
loading

Table of Contents