Applet: uShopSearch2

Description:
The uShopSearch2 applet makes it possible to search through a flat-file database and dynamically generate product pages. Options include a category selection list by which the customer can optimize his/her search and a target parameter to specify the frame/window where the dynamically generated product pages will be displayed.

Note that the example below displays the dynamically generated product pages in a new window, however, the ideal setup of this applet is to put this applet in one frame and set the "target" parameter to display the dynamically generated product pages in a second frame. See Example.

Example:


<APPLET CODE="uShopSearch2.class" CODEBASE="../classes/" WIDTH=440 HEIGHT=70>
<PARAM NAME="category_options"     VALUE="Tools=example_data_file1.txt,
                                          More Tools=example_data_file2.txt">
<PARAM NAME="target"               VALUE="search_results">
<PARAM NAME="image_directory"      VALUE="../images/">
<PARAM NAME="dyn_popup"            VALUE="YES">
<PARAM NAME="dyn_text_color"       VALUE="#000000">
<PARAM NAME="dyn_background_color" VALUE="#FFFFFF">
<PARAM NAME="text_color"           VALUE="#000000">
<PARAM NAME="background_color"     VALUE="#B3D9FF">
</APPLET>


Parameters:

Name Description
codebase This parameter is actually part of the <APPLET> tag and therefore should be specified on the first line of the Applet (see example). It allows you to specify the location of this applet's class file. The recommended value is "../classes/". See codebase for more information.
category_label This parameter allows you to change the text that is displayed next to the category selection menu. The default value is "Category".
category_options This parameter allows you to specify the name of the categories and the names of the data files for each category. The format of this parameter is CATEGORYNAME=CATEGORYFILE, where CATEGORYNAME is the name of the category as you would like it to be displayed in the drop-down list, and CATEGORYFILE is the name of the category data file. See the uShopTM User's Guide for more information about the format of these bar-delimited data files.
target This parameter allows you to specify the "target" frame or window in which the dynamically generated product pages will be displayed. The default value of this parameter is "NONE" which would cause the generated page to be displayed in the current frame. The suggested value is something like "FRAME2", where "FRAME2" is a separate frame being used to display the dynamically generated product pages.
keyword_label This parameter allows you to change the text that is displayed next to the keyword entry box. The default value is "Keyword".
search_label This parameter allows you to change the text that is displayed on the "Search" button. The default value is "Search".
matches_label This parameter allows you to change the text that is displayed next to "total number of matches" indicator. The default value is "Total Matches".
back_label This parameter allows you to change the text that is displayed on the "Previous" button. The default value is "<< Prev".
next_label This parameter allows you to change the text that is displayed on the "Next" button. The default value is "Next >>".
image_directory This parameter allows you to specify the directory where you product images are located. The default value is "../images/".
product_template The name of the product template file that will be used as the template of all dynamically generated product pages. The default value for this parameter is "product_template.html". This file should be located in your "classes" directory. See the uShopTM User's Guide for more information about setting up the product template file.
dyn_popup This parameter allows you to specify whether to display a message in a popup window whenever this item has been added to the shopping cart from one of the dynamically generated product pages. Valid values are "YES" or "NO". The default value is "NO".
dyn_background_color This parameter allows you to specify the background color of the applet that is created on the dynamically generated product pages. This value can be specified as an RGB value such as "#FFFFFF" or as one of the keyword colors such as "white". See color parameter format for more information on colors.
dyn_text_color This parameter allows you to specify the text color of the applet that is created on the dynamically generated product pages. This value can be specified as an RGB value such as "#000000" or as one of the keyword colors such as "black". See color parameter format for more information on colors.
background_color This search applet's background color. This value can be specified as an RGB value such as "#FFFFFF" or as one of the keyword colors such as "white". See color parameter format for more information on colors.
text_color This search applet's text color. This value can be specified as an RGB value such as "#000000" or as one of the keyword colors such as "black". See color parameter format for more information on colors.