Adobe Dreamweaver CC 2015 User Manual

Page 544

Advertising
background image

537

Dynamic sites, pages and web forms

Last updated 6/3/2015

<html>

<head>

<title>Trio Motors Information Page</title>

</head>

<body>

<h1>About Trio Motors</h1>

<p>Trio Motors is a leading automobile manufacturer.</p>

<!--- embedded instructions start here --->

<cfset department="Sales">

<cfoutput>

<p>Be sure to visit our #department# page.</p>

</cfoutput>

<!--- embedded instructions end here --->

</body>

</html>

The embedded instructions on this page perform the following actions:

1

Create a variable called department and assign the string "Sales" to it.

2

Insert the variable’s value, "Sales", in the HTML code.

The application server returns the following page to the web server:

<html>

<head>

<title>Trio Motors Information Page</title>

</head>

<body>

<h1>About Trio Motors</h1>

<p>Trio Motors is a leading automobile manufacturer.</p>

<p>Be sure to visit our Sales page.</p>

</body>

</html>

The web server sends the page to the requesting browser, which displays it as follows:

About Trio Motors

Trio Motors is a leading automobile manufacturer.

Be sure to visit our Sales page.

You choose a scripting or tag-based language to use depending on the server technology available on your server. Here
are the most popular languages for the server technologies supported by Dreamweaver:

Dreamweaver can create the server-side scripts or tags necessary to make your pages work, or you can write them by
hand in the Dreamweaver coding environment.

Server technology

Language

ColdFusion

ColdFusion Markup Language (CFML)

Active Server Pages (ASP)

VBScript

JavaScript

PHP

PHP

Advertising