Windowdimensions(); A Simple Command Example - MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Manual

Extending dreamweaver
Hide thumbs Also See for DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER:
Table of Contents

Advertisement

windowDimensions()

Description
Sets specific dimensions for the Parameters dialog box. If this function is not defined, the window
dimensions are computed automatically.
Note: Do not define this function unless you want an Options dialog box that is larger than
640 x 480 pixels.
Arguments
platform
The value of the
user's platform.
Returns
Dreamweaver expects a string of the form
The returned dimensions are smaller than the size of the entire dialog box because they do not
include the area for the OK and Cancel buttons. If the returned dimensions do not accommodate
all options, scroll bars appear.
Example
The following example of the
Parameters dialog box to 648 x 520 pixels:
function windowDimensions(){
return "648,520";
}

A simple Command example

This simple extension adds an item to the Commands menu and lets you convert selected text in
your document to either uppercase or lowercase. When you click the menu item, it activates a
three-button interface that lets you submit your choice.
You create this extension by performing the following steps:
Creating the user interface (UI)
1
Writing the JavaScript code
2
Placing the files in the Commands folder
3
This example creates two files in the Commands folder: Change Case.html, which contains the
UI, and Change Case.js, which contains the JavaScript code. If you prefer, you can create only the
Change Case.html file and put both the JavaScript code and the UI in it.
138
Chapter 7: Commands
argument is either
platform
windowDimensions()
or
"macintosh"
"widthInPixels,heightInPixels".
function sets the dimensions of the
, depending on the
"windows"

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER and is the answer not in the manual?

This manual is also suitable for:

Dreamweaver mx 2004

Table of Contents