KoolAutoComplete Class [PHP]

Summary

Properties Description
align Get or set the alignment of option panel in autocomplete
attachTo Get or set the id of textbox that KoolAutoComplete attaches to
boxHeight Get or set the height of option panel in autocomplete
boxWidth Get or set the width of option panel in autocomplete
delayTime Get or set the number of millisecond autocomplete will wait before bringing out suggestion
effect Get or set the open effect of autocomplete's option panel
footerTemplate Get or set the footer template of option panel
headerTemplate Get or set the header template of option panel
id Get or set id of KoolAutoComplete
itemTemplate Get or set the item template of option panel.
maxBoxHeight Get or set the max height of option panel in autocomplete
minBoxHeight Get or set the min height of option panel in autocomplete
openDirection Get or set open direction of autocomplete
searchFilter Get or set the searching method of autocomplete.
serviceFunction Get or set the name of koolajax-enabled function that will be used to update item list from server
servicePage Get or set the url that autocomplete will post the typed text to get appropriate item list
styleFolder Get or set folder which contain css style for autocomplete
superAbove Get or set whether whether "shim" technique is used.
Methods Description
addItem Add item to option list of autocomplete
LoadXML Create KoolAutoComplete from XML.
Render Render the KoolAutoComplete
RegisterScript Return html to register js library for autocomplete.
RegisterCSS Return html to register CSS for autocomplete
RenderAutoComplete Return html content of KoolAutoComplete body
StartupScript Return js code to inititate autocomplete

Properties Detail

alignTop

string align

Get or set the alignment of option panel in autocomplete

Default value : "right"

Allowed values :

  • "left" : Align option panel to the left.
  • "right" : Align option panel to the right.

Show/Hide Code

Supported from version: 1.0.0.0

attachToTop

string attachTo

Get or set the id of textbox that KoolAutoComplete attaches to

Default value : "down"

Allowed values :

  • "down" : Combobox open option panel at bottom.
  • "up" : Combobox open option panel at top.

Show/Hide Code

Supported from version: 1.0.0.0

boxHeightTop

string boxHeight

Get or set the height of option panel in autocomplete

Show/Hide Code

Supported from version: 1.0.0.0

boxWidthTop

string boxWidth

Get or set the width of option panel in autocomplete

Show/Hide Code

Supported from version: 1.0.0.0

delayTimeTop

int delayTime

Get or set the number of millisecond autocomplete will wait before bringing out suggestion

Show/Hide Code

Supported from version: 1.0.0.0

effectTop

string effect

Get or set the open effect of autocomplete's option panel. Note: More effects will be added in the future.

Allowed values :

  • "none" : Combobox open option panel at bottom.

Show/Hide Code

Supported from version: 1.0.0.0

footerTemplateTop

string footerTemplate

Get or set the footer template of option panel

Show/Hide Code

Supported from version: 1.0.0.0

headerTemplateTop

string headerTemplate

Get or set the header template of option panel

Show/Hide Code

Supported from version: 1.0.0.0

idTop

string id

Get or set the id for autocomplete. This id will be use as variable name of autocomplete at client-side.

Show/Hide Code

Supported from version: 1.0.0.0

itemTemplateTop

string itemTemplate

Get or set the item template of option panel. The template contains marking to be replaced item's data. For example, {text} will be replaced by the text of each items.

Show/Hide Code

Supported from version: 1.0.0.0

maxBoxHeightTop

string maxBoxHeight

Get or set the max height of option panel in autocomplete

Show/Hide Code

Supported from version: 1.0.0.0

minBoxHeightTop

string minBoxHeight

Get or set the min height of option panel in autocomplete

Show/Hide Code

Supported from version: 1.0.0.0

openDirectionTop

string openDirection

Get or set open direction of autocomplete

Default value : down

Allowed values :

  • down : AutoComplete open option panel at bottom.
  • up : AutoComplete open option panel at top.

Show/Hide Code

Supported from version: 1.0.0.0

searchFilterTop

string searchFilter

Get or set the searching method of autocomplete.

Default value : "startwith"

Allowed values :

  • "startwith" : The autocomplete will look for option text that starts same characters with typed text.
  • "contain" : The autocomplete will look for option text that contains the typed text.

Show/Hide Code

Supported from version: 1.0.0.0

serviceFunctionTop

string serviceFunction

Get or set the name of koolajax-enabled function that will be used to update item list from server The service function will will take a text agurment ( this is the text that user keys in at client-side and sent to server-side) and return an array contain item data.

Show/Hide Code

Supported from version: 1.0.0.0

servicePageTop

string servicePage

Get or set the url that autocomplete will post the typed text to get appropriate item list

Show/Hide Code

Supported from version: 1.0.0.0

styleFolderTop

string styleFolder

Get or set folder which contain css style for autocomplete

Show/Hide Code

Supported from version: 1.0.0.0

superAboveTop

bool superAbove

Get or set whether whether "shim" technique is used. This is very useful if your application running in IE6 because it helps option panel to open above all other elements.

Default value : "true"

Show/Hide Code

Supported from version: 1.0.0.0

Methods Detail

addItemTop

KoolAutoCompleteItem addItem(string  $text, [array  $data])

Add item to option list of autocomplete

Show/Hide Code

Supported from version: 1.0.0.0

LoadXMLTop

function  LoadXML(string xml)

Create KoolAutoComplete with XML content. The input value may be string or XmlDocument.

Show/Hide Code

Supported from version: 1.2.0.0

RenderTop

void Render()

Render the KoolAutoComplete

Show/Hide Code

Supported from version: 1.0.0.0

RegisterScriptTop

string RegisterScript()

Return html to register js library for autocomplete.

Show/Hide Code

Supported from version: 1.0.0.0

RegisterCSSTop

string RegisterCSS()

Return html to register CSS for autocomplete

Show/Hide Code

Supported from version: 1.0.0.0

RenderAutoCompleteTop

string RenderAutoComplete()

Return html content of KoolAutoComplete body

Show/Hide Code

Supported from version: 1.0.0.0

StartupScriptTop

string StartupScript()

Return js code to inititate autocomplete

Show/Hide Code

Supported from version: 1.0.0.0