beautypg.com

Adobe Dreamweaver CC 2015 User Manual

Page 567

background image

560

Dynamic sites, pages and web forms

Last updated 6/3/2015

3

Add dynamic content to a web page.

After you define a recordset or other data source, and add it to the Bindings panel, you can insert the dynamic
content the recordset represents into the page. The Dreamweaver menu-driven interface makes adding dynamic
content elements as easy as selecting a dynamic content source from the Bindings panel, and inserting it into an
appropriate text, image, or form object within the current page.

When you insert a dynamic content element or other server behavior into a page, Dreamweaver inserts a server-side
script into the page’s source code. This script instructs the server to retrieve data from the defined data source and
render it within the web page. To place dynamic content within a web page, you can do one of the following:

• Place it at the insertion point in either Code or Design view.

• Replace a text string or other placeholder.

Insert it into an HTML attribute. For example, dynamic content can define the src attribute of an image or the
value attribute of a form field.

4

Add server behaviors to a page.

In addition to adding dynamic content, you can incorporate complex application logic into web pages by using
server behaviors. Server behaviors are predefined pieces of server-side code that add application logic to web pages,
providing greater interaction and functionality.

The Dreamweaver server behaviors let you add application logic to a website without having to write the code
yourself. The server behaviors supplied with Dreamweaver support ColdFusion, ASP, and PHP document types.
The server behaviors are written and tested to be fast, secure, and robust. The built-in server behaviors support
cross-platform web pages for all browsers.

Dreamweaver provides a point-and-click interface that makes applying dynamic content and complex behaviors to
a page as easy as inserting textual and design elements. The following server behaviors are available:

• Define a recordset from an existing database. The recordset you define is then stored in the Bindings panel.

• Display multiple records on a single page. You select either an entire table or individual cells or rows that contain

dynamic content, and specify the number of records to display on each page view.

• Create and insert a dynamic table into a page, and associate the table with a recordset. You can later modify both

the table’s appearance and the repeating region by using the Property inspector and Repeating Region Server
Behavior, respectively.

• Insert a dynamic text object into a page. The text object you insert is an item from a predefined recordset, to

which you can apply any of the data formats.

• Create record navigation and status controls, master/detail pages, and forms for updating information in a

database.

• Display more than one record from a database record.

• Create recordset navigation links that allow users to view the previous or next records from a database record.

• Add a record counter to help users keep track of how many records were returned, and where they are in the

returned result.

You can also extend Dreamweaver server behaviors by writing your own, or installing server behaviors written by
third parties.

5

Test and debug the page.

Before making a dynamic page—or an entire website—available on the web, you should test its functionality. You
should also consider how your application’s functionality might affect people with disabilities.