Adobe Extending Dreamweaver CS4 Uživatelský manuál Strana 302

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 387
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 301
296
EXTENDING DREAMWEAVER CS4
Data sources
To provide a dialog box for the user, create a set of command files: a command definition file in HTML and a
command implementation file in JavaScript (for more information about command files, see
How commands work
on page 131).
The command definition file tells Dreamweaver the location of the supporting implementation JavaScript files. The
definition file also tells the form for the dialog box that the user sees. The supporting JavaScript file determines the
buttons for the dialog box and how to assign the user input from the dialog box.
Create the command definition file
1 Create a new blank file.
2 Enter the following:
<!DOCTYPE HTML SYSTEM "-//Adobe//DWExtension layout-engine 10.0//dialog">
<html>
<head>
<title>MyDatasource Variable</title>
<script src="MyDatasource_Variable.js"></script>
<SCRIPT SRC="../Shared/MM/Scripts/CMN/displayHelp.js"></SCRIPT>
<SCRIPT SRC="../Shared/MM/Scripts/CMN/string.js"></SCRIPT>
<link href="../fields.css" rel="stylesheet" type="text/css">
</head>
<body>
<form>
<div ALIGN="center">
<table border="0" cellpadding="2" cellspacing="4">
<tr>
<td align="right" valign="baseline" nowrap>Name:</td>
<td valign="baseline" nowrap>
<input name="theName" type="text" class="medTField">
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
3 Save the file as MyDatasource_Variable.htm in the Configuration/Commands folder.
Note: The file MyDatasource_Variable.js is the implementation file that you create in the next procedure.
Create the supporting JavaScript file
1 Create a new blank file.
2 Enter the following:
Zobrazit stránku 301
1 2 ... 297 298 299 300 301 302 303 304 305 306 307 ... 386 387

Komentáře k této Příručce

Žádné komentáře