Exercise 4: Testing the Trip Search Results page
In this exercise, you will test the tripsearchresults.cfm page. First, you will test the Trip Search Results page by entering criteria on the Trip Search form and inspecting the results. Next, you will finish the code to construct the complete WHERE clause for all three columns that you can query from the Trip Search form.
To test the Trip Search Results page:
- View the tripsearchform.cfm page from the my_app directory in your browser and do the following:
- In the Trip Location drop-down list, select the Begins With option, and enter the value C in the text box.
- Click Search.
The Trip Results page displays several entries, as follows:

- Notice in the Trip Results page that only one trip has a trip location of China.
- Click the Back button in your browser to return to the Trip Search page.
- In the Trip Location drop-down list of the Trip Search page, select the Is option, enter the value China, and then click Search.
The Trip Search Results page displays only one entry for the trip to China in the HTML table.
- Verify that the other criteria (departure date and price) are not taken into consideration yet as follows:
- Click the Back button in the browser to return to the Trip Search page.
- In the Departure Date drop-down list box, select Before, enter 1/1/1900 as the date, and select Smaller Than 0 for the price.
Either of these conditions would produce a results page with no rows.
- Click the Search button.
The Trip Search Results page should be identical to the one in Step 2, because the code to build the WHERE clause in the Trip Search Results page does not include departure date and price.