Reference - SS.control.searchbox - Search box
Creates a suggest as you type textbox by using a range of different
data sources. This control can also be attached to a standard HTML
box without the need to use a DIV holder.
e.g. <input type="text" ext="searchbox"/>
Attributes:
Functions:
Members:
Attributes
cache
Cache Results
If the datasource is a URL, the returned document maybe cached by the browser. To prevent
this caching, set cache to false. This appends a random parameter to
the end of the URL to prevent the browser from caching the response.
b - {Boolean} (default = 1)
v1.0.0.20080527
[Top]
cacheresults
Cache Results
If datasource is an URL, the results can be cached so subsequent searches search
within the data returned thus preventing additional queries to the web server.
b - {Boolean} (default = 1)
v1.0.0.20080527
[Top]
casesensitive
Case Sensitive Search Comparison
If set to true, search items much match on case as well as value.
0 - {Boolean} - Case insensitive search (default)
1 - {Boolean} - Case sensitive search
v1.0.0.20080527
[Top]
css
Classname style
CSS style applied to the list which appears under the search box. Setting this attribute overrides the
current style giving you the ability to fully customize the look of the search box list.
The style rule position:absolute must be set in the overriding style if this rule is overridden.
s - {String} - style name
v1.0.0.20080527
[Top]
css_highlight
CSS Style Highlight Items
CSS style applied to the search result that highlights the currently selected list item when the user uses the
arrow keys to move up / down the list. Setting this attribute overrides the
current style giving you the ability to fully customize the look.
s - {String} - style name
v1.0.0.20080527
[Top]
css_list
CSS Style For Results List
CSS style applied to the search box. Setting this attribute overrides the
current style giving you the ability to fully customize the look of the search box.
s - {String} - style name
v1.0.0.20080527
[Top]
css_match
CSS Style Highlight Matched Text
CSS style applied to the text that has been matched in the search list results. Setting this attribute overrides the
current style giving you the ability to fully customize the look.
s - {String} - style name
v1.0.0.20080527
[Top]
datasource
Data source to do the search against
Datasource is a URL link to an document containing the data that is to be searched against.
This could be an XML or plain text document. The easiest way to explain the datasource attribute is
to see it in action. Click here to see the example.
The document can be static or dynamic. Search parameters are passed on the end of the URL.
url - {String} - source data location
v1.0.0.20080527
[Top]
delay
Key stroke delay
Delay in milliseconds between the last keystroke the user made before the search is performed.
d - {Integer} (default (ms) = 350)
v1.0.0.20080527
[Top]
delimiter
Datasource Delimiter
If the datasource is a plain text file, the value of the delimiter is used to identify
different terms within the returned data.
d - {String} (Default = newline)
v1.0.0.20080527
[Top]
linkto
Link To Control Id
Links the value selected in the search box to the value in another HTML control that
supports control.value.
s - {String} - Id of the control to link to
v1.0.0.20080527
[Top]
matchmode
Datasource Comparison Mode
There are three match modes. Mode 0: match against text only. Mode 1: match against value online.
Mode 2: Match against text and value.
0 - {Integer} - match text only (default)
1 - {Integer} - match value only
2 - {Integer} - match text and value
v1.0.0.20080527
[Top]
maxresults
Maximum number of results
Sets the maximum number of results that are returned based on the search criteria.
m - {Integer} (default = 25)
v1.0.0.20080527
[Top]
minchars
Minimum Number of Characters to Perform Search
Defines the minimum number of characters that must be entered before a search on the datasource is performed.
chars - {Integer} (Default = 3)
v1.0.0.20080527
[Top]
onchange
On Change Event Called Function
String function which is evaluated and then called when the value of the textbox changes
f - {String} - Javascript function.
v1.0.0.20080527
onresults
On Results Displayed Event Function
String function which is evaluated and then called whenever the list of matched results changed
f - {String} - Javascript function.
v1.0.0.20080625
postvalue
Post Value to Datasource
If datasource is a URL, and postvalue is true then the value of the textbox is
posted to the destination using the POST method. The parameter name equals the textbox Id and the value equals the textbox value.
If set to false then the datasource if queried using the GET method.
b - {Boolean} - (default = false)
v1.0.0.20080527
src
Datasource (URL)
Alias for datasource. URL which can be queried to return list of results
v1.0.0.20080625
[Top]
srcparam
Datasource URL Parameter
Name of the parameter that is passed on the URL defined in src.
s - {String} - (default = "v")
v1.0.0.20080625
[Top]
visibleitems
Number of visible search items
Sets the maximum number of visible search items that can be displayed on the screen at any one time. If the
number of search results exceeds the visibleitems attribute setting the
a scroll bar will appear.
v - {Integer} (default = 6)
v1.0.0.20080527
[Top]
Functions
clear
Clears the list of results
Clears the visible list of results from display.
None
None
v1.0.0.20080527
[Top]
Members
data
Data array
Contains an array of objects to search against. This can be
manually set as a Javascript array of object which with then be used
as the datasource.
v1.0.0.20080527
[Top]
selectedtext
Text of Data Item
Contains text of the selected data item
v1.0.0.20080527
[Top]
selectedvalue
Value of Data Item
Contains value of the selected data item
v1.0.0.20080527
[Top]
value
Value
Value of the selected item in the textbox.
v1.0.0.20080527
[Top]