Macromedia dreamweaver 8-using dreamweaver User Manual

Page of 1030
778
Chapter 38:  Adding Custom Server Behaviors
Server behaviors 
If you are a developer proficient in Macromedia ColdFusion, ASP.NET, JavaScript, VBScript, 
PHP, or Java, you can write your own server behaviors. The steps to create a server behavior 
include the following tasks:
Writing one or more code blocks that perform the required action.
For information on creating server behaviors with the Dreamweaver Server Behavior 
Builder see 
. For information on the 
syntax supported by Dreamweaver server behaviors, see 
Specifying where the code block should be inserted within the page’s HTML code.
For information on positioning code blocks within a page see 
If the server behavior requires that a value be specified for a parameter, creating a dialog 
box that prompts the web developer applying the behavior to supply an appropriate value.
For information on supplying parameter values to a server behavior using a dialog box see 
.
Testing the server behavior before making it available to others. 
For guidelines on testing server behaviors see 
.
About code blocks
The code blocks you create in the Server Behavior Builder are encapsulated in a server 
behavior that appears in the Server Behaviors panel. The code can be any valid runtime code 
for the specified server model. For example, if you choose ColdFusion as the document type 
for your custom server behavior, then the code you write must be valid ColdFusion code that 
runs on a ColdFusion application server. 
Related topics
Code blocks
You can create the code blocks either directly within the Server Behavior Builder, or you can 
copy and paste the code from other sources. Each code block you create in the Server Behavior 
Builder must be a single tag or script block. If you need to insert multiple tag blocks, split 
them into separate code blocks. 
For more information, see