Operation Manual

580
USING DREAMWEAVER
Building applications visually
Last updated 3/28/2012
When the page runs, the values of the recordset’s CODE field are inserted in the corresponding rows in the dynamic
table. For example, if the Canberra, Australia, rental location has the code CBR, the following URL is used in the
Canberra row in the dynamic table:
locationDetail.php?recordID=CBR
7 Save the page.
Open the detail page and pass a record ID (ASP)
1 Select the dynamic content to double as a link.
2 In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button, and select Go to Detail Page
from the pop-up menu.
3 In the Detail Page box, click Browse and locate the page.
4 Specify the value you want to pass to the detail page by selecting a recordset and a column from the Recordset and
Column pop-up menus. Typically the value is unique to the record, such as the record’s unique key ID.
5 If desired, pass existing page parameters to the detail page by selecting the URL Parameters or Form Parameters
options.
6 Click OK.
A special link surrounds the selected text. When the user clicks the link, the Go To Detail Page server behavior passes
a URL parameter containing the record ID to the detail page. For example, if the URL parameter is called id and the
detail page is called customerdetail.asp, the URL looks something like the following when the user clicks on the link:
http://www.mysite.com/customerdetail.asp?id=43
The first part of the URL, http://www.mysite.com/customerdetail.asp, opens the detail page. The second part, ?id=43,
is the URL parameter. It tells the detail page what record to find and display. The term id is the name of the URL
parameter and 43 is its value. In this example, the URL parameter contains the record’s ID number, 43.
Find and display the requested record on the detail page
In order to display the record requested by the master page, you must define a recordset to hold a single record and
bind the recordset columns to the detail page.
1 Switch to the detail page. If you don’t have a detail page yet, create a blank page (File > New).
2 In the Bindings panel (Window > Bindings), click the Plus (+) button and select Recordset (Query) or DataSet
(Query) from the pop-up menu.
The simple Recordset or DataSet dialog box appears. If the advanced dialog box appears instead, click Simple.
3 Name the recordset, and select a data source and the database table that will provide data to your recordset.
4 In the Columns area, select the table columns to include in the recordset.
The recordset can be identical to or different from the recordset on the master page. Usually a detail page recordset
has more columns to display more detail.
If the recordsets are different, make sure the recordset on the detail page contains at least one column in common with
the recordset on the master page. The common column is usually the record ID column, but it can also be the join field
of related tables.
To include only some of the table’s columns in the recordset, click Selected and choose the desired columns by
Control-clicking (Windows) or Command-clicking (Macintosh) them in the list.