<!--- 
  Filename:     SearchForm.cfm
  Created by:   Nate Weiss (NMW)
  Date Created: 2/18/2001
  Please Note:  Maintains "last" search via Client variables
--->

<!--- Determine value for "Search Pre-Fill" feature --->
<!--- When user submits form, save search criteria in client var --->
<CFIF IsDefined("Form.SearchCriteria")>
  <CFSET CLIENT.LastSearch = Form.SearchCriteria>
  <CFSET SearchPreFill     = Form.SearchCriteria>

<!--- If not submitting yet, get prior search word (if possible) --->  
<CFELSEIF IsDefined("CLIENT.LastSearch")>
  <CFSET SearchPreFill = CLIENT.LastSearch>

<!--- If no prior search criteria exists, just show empty string --->  
<CFELSE>
  <CFSET SearchPreFill = "">
</CFIF>


<HTML>
<HEAD><TITLE>Search Orange Whip</TITLE></HEAD>
<BODY>
  <H2>Search Orange Whip</H2>

  <!--- Simple search form, which submits back to this page --->
  <CFFORM ACTION="#CGI.SCRIPT_NAME#" METHOD="Post">
    
    <!--- "Search Criteria" field --->
    Search For:
    <CFINPUT NAME="SearchCriteria" VALUE="#SearchPreFill#" 
      REQUIRED="Yes" 
      MESSAGE="You must type something to search for!">  
    
    <!--- "Submit" button --->
    <INPUT TYPE="Submit" VALUE="Search"><BR>

  </CFFORM>

</BODY>
</HTML>

