URL of the server side script.
Note*: When dataSupply has a length greater than 0, no ajax request is sent.
Limit's the number of entries stored in cache.
Personal function to use in place of default pattern matching. Return true for correct match, false for incorrect. Function Params:
-inputval: Current value within the textbox that is in focus.
-value: Value of the entry in the dataSupply array.
-currentList: Holds the current values that have passed this functions pattern match.
-i: Current index of the dataSupply array.
-dataSupply: The complete array passed to the autoComplete function
Note*: The this object references the input currently in focus.
Array of values/objects to run auto-complete as local instead of ajax requests. Default pattern match is: "/^(input value)/i"
Time delay of when to send the ajax requests in milliseconds.
inputControl gives you access to changing the name for cache storage. When doing pattern matching, or sending requests, the string returned by this function is used.
CSS Class that will be attached to the UL created.
Limits the number of values added to the drop down list. When -1, no limit is imposed.
Maximum number of ajax requests allowed within a scripts duration. If 0, no limit is applied
Minimum number of required characters to send server side.
Parameters that get passed to the server. The value defined by postVar will be overridden by the users input.
Name of the users input as it gets posted to the server.
Prevents form submission when user selects a value from the UL drop down list using the enter key.
Type of request during ajax calls. Only use 'get' or 'post'.
CSS Class toggled on li elements when mouseover or up/down events occur.
Tells autoComplete whether or not to use script level caching.
Width of the UL drop down list. Default's to the width of the Input field
Callback function when the user loses focus on the input field. Has a 150 millisecond delay.
Callback function when the user focuses on the input field.
Callback function when maximum number of ajax requests is reached. Will only fire if maxRequests is not 0.
Callback function when the user selects an option from the UL drop down list.
Callback function when the user highlights one of the options of the UL drop down list.
$('selector of input').autoComplete('event name', ...other params...);
The settings trigger allows for changes to the settings for that inputs autoComplete at any point of time. This can be very useful if the metadata plugin is not installed, yet separate functionality is needed for each input. Simply initiate the autocomplete on each input, and use the settings trigger to attach special parameters to each input's autoComplete instance.
Extra Functionality*: If you pass a funtion as the newSettings var, you can view that inputs current settings and cache, and adjust accordingly. Just return the array [newSettings, cache]. Here's the format:
$('input selector').autoComplete('settings', function(settings, cache){ // ...Check or make changes to the current settings and cache here... return [settings, cache]; });
The flush event clears out the inner cache of results, as well as the number of requests made. And optional, second boolean parameter can be passed if only the cache needs to be flushed, not the number of requests made.
The destroy trigger unbinds that inputs autoComplete event's.
The button.ajax trigger allows for sending requests through an external trigger(button). It's recommended a special post var is passed to differentiate between a normal request and a triggered request. This can enable a sort of select drop down functionality, where clicking a button can show the whole list, or users can just use the autoComplete to find their selection.
The button.supply trigger is essentially the same as the button.ajax trigger, except it works with a localized set of results instead of through an ajax requests. Additionally, an optional second data parameter can be passed to supply a different set of results on just this trigger, instead of the normal set supplied during initialization.