MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual page 300

Table of Contents

Advertisement

280
3
Note
To use
must be the collection's unique alias name as defined in the k2server.ini and the
external
To present the results of the search to the user:
1
2
value=simple checked> Simple<br>
<input type=radio
name=type
value=explicit> Explicit<br>
<p>Enter a search string:</p>
<input type=text
name=searchstring size=50>
<p><input type=submit
name=search1
value="Search">
<input type=reset
value="Reset">
</form>
</body>
</html>
Save the file as
collectionsearchform.cfm
to search a Verity K2 Server collection, the
cfsearch
attribute must be "No" (the default).
Create a new file in ColdFusion Studio.
Modify the file so that it appears as follows:
<html>
<head>
<title>Search output page</title>
</head>
<body>
<cfsearch name="Search1"
collection="#form.collection#"
form type="#form.type#"
criteria="#form.searchstring#">
<h2>Search Results</h2>
<cfoutput>
#Search1.RecordCount# found out of
#Search1.RecordsSearched# searched.
</cfoutput>
<hr noshade>
<cfoutput query="Search1">
<a href="#Search1.URL#">#Search1.title#</a><br>
</cfoutput>
Chapter 15 Indexing and Searching Data
.
collection
attribute

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents