Creating The Main.html File - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide
In this folder, create a new file named Main.html . You can use any text or HTML editor to edit this file,
including Adobe GoLive CS2 itself.

Creating the Main.html file

The Main.html file contains the markup tags and JavaScript that define an extension.
To create a Main.html file:
1. In GoLive, create a new page, using File > New Document. In the dialog, select Favorites and HTML
Page, then click OK.
This automatically creates and displays an HTML document with basic page elements such as <head>
and <body> .
2. Switch to Source view and add a <jsxmodule> tag in the <body> element before the <p> start tag:
<body>
</body>
For more information on this tag, see
3. Add a <script> element after <jsxmodule> :
<body>
</body>
Typically, the <script> element is placed inside the <body> element, but you can put it inside the
<head> element.
4. Inside the <script> element, add the following event handling function:
<script>
</script>
For more information on defining and using JavaScript functions in an extension, see
event-handling functions
<jsxmodule name="My First Extension">
<p>
</p>
<jsxmodule name="My First Extension">
<script>
</script>
<p>
</p>
function initializeModule() {
menubar["Test"].items["Item1"].addEventListener("menuSignal",
'function(e){Window.alert(e.target.name + " was selected!");}')
}
below.
Adobe GoLive CS2
Adding the module tag
How to Create an Extension
below.
22
Adding

Advertisement

Table of Contents
loading

Table of Contents