Adobe 38040334 - Dreamweaver CS3 User Manual page 134

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Add the following code to the file to create the form:
2
<!DOCTYPE HTML SYSTEM "-//Macromedia//DWExtension layout-engine 5.0//dialog">
<HTML>
<HEAD>
<!-- Copyright 2001-2002 Macromedia, Inc. All rights reserved. -->
<Title>Make Uppercase or Lowercase</Title>
<SCRIPT SRC="Change Selection Case.js"></SCRIPT>
</HEAD>
<BODY>
<form name="uorl">
<table border="0">
<!--DWLayoutTable-->
<tr>
<td valign="top" nowrap> <p>
<label>
<input type="radio" name="RadioGroup1" value="uppercase" checked>
Uppercase</label>
<br>
<label>
<input type="radio" name="RadioGroup1" value="lowercase">
Lowercase</label>
</p></td>
</tr>
</table>
</form>
</BODY>
</HTML>
3
Save the file as Change Case.htm in the Configuration/Commands folder.
The contents of the
Title
the form, a table with two cells controls the layout of the elements. Within the table cells are the two radio buttons,
Uppercase and Lowercase. The Uppercase option has the
ensuring that the user must either select one of the two options or cancel the command.
The form looks like the following figure:
The commandBUttons() function supplies the OK and Cancel buttons that let the user submit the choice or cancel
the operation. For more information, see "commandButtons()" on page 134.
Writing the JavaScript code
The following example consists of two extension API functions,
which Dreamweaver calls, and one user-defined function,
function.
commandButtons()
In this example, you will write JavaScript to perform the following tasks:
• "Determining whether the command should be enabled or dimmed" on page 129
tag,
Make Uppercase or Lowercase
, appears in the top bar of the dialog box. Within
attribute, making it the default selection and
checked
canAcceptCommand()
, which is called from the
changeCase()
DREAMWEAVER CS3
Extending Dreamweaver
and
,
commandButtons()
128

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents