System information

123
CHAPTER 11
Lesson 8: Implementing Browsing and Searching
In this lesson, you will further enhance the Compass Travel Macromedia ColdFusion application
by providing code to implement the navigation and searching functions.
This lesson contains the following exercises:
Exercise 1: Enabling users to browse trip details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Exercise 2: Determining actions based on which button a user clicks . . . . . . . . . . . . . . . . . . . 127
Exercise 3: Enabling searching from the Trip Detail page . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
ColdFusion tags and functions introduced in this lesson
The following table identifies the ColdFusion tag and structure that you use in this lesson to
enhance the Trip Maintenance application:
Exercise 1: Enabling users to browse trip details
In “Lesson 6: Creating a Main Application Page” on page 97, you added buttons to the Trip
Detail page to browse records in the database. In this exercise, you build the action pages that
implement the actions for these buttons.
To enable browsing, you build the Navigation Action page. This page determines which trip
record appears on the Trip Detail page after the user clicks one of the navigation buttons. There is
no HTML output displayed from this action page. Instead, this page uses dynamic SQL to
identify the
tripID that must appear on the Trip Detail page. In this dynamic SQL statement,
the proper
tripID is passed as a parameter to the URL, and then redirects the tripID to the Trip
Detail page.
Element Type Description
cflocation
Tag Tag opens a ColdFusion page or HTML file.
URL
Structure Structure to hold the variables within a URL.