MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 529

Developing coldfusion mx applications
Table of Contents

Advertisement

Save the file as collection_db_search_form.cfm in the myapps directory under the web_root.
2
This file is similar to collection_search_form.cfm, except the form uses
collection_db_results.cfm, which you create in the next step, as its action page.
Create another ColdFusion page with the following content:
3
<html>
<head>
<title>Search Results</title>
</head>
<body>
<cfsearch
collection="#Form.collname#"
name="getEmps"
criteria="#Form.Criteria#">
<!--- output the record set --->
<cfoutput>
Your search returned #getEmps.RecordCount# file(s).
</cfoutput>
<cfoutput query="getEmps">
<p><table>
<tr><td>Title: </td><td>#Title#</td></tr>
<tr><td>Score: </td><td>#Score#</td></tr>
<tr><td>Key: </td><td>#Key#</td></tr>
<tr><td>Summary: </td><td>#Summary#</td></tr>
<tr><td>Custom 1:</td><td>#Custom1#</td></tr>
<tr><td>Column list: </td><td>#ColumnList#</td></tr>
</table></p>
</cfoutput>
</body>
</html>
Save the file as collection_db_results.cfm in the myapps directory under the web_root.
4
View collection_db_search_form.cfm in the web browser and enter the name of the collection
5
and search terms; for example, search the CodeColl collection for lightner or crooks.
Working with record sets
529

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion mx

Table of Contents