=head1 NAME GvaScript.Autocompleter - autocompletion on form input fields =head1 SYNOPSIS In Javascript : var autocompleter1 = new GvaScript.Autocompleter( "http::/some/url", {minimumChars : 2, strict : true, onBind : doSomething, onLeave : doSomethingElse} ); var autoCompleter2 = new GvaScript.Autocompleter( ["foo", "bar", ...], options); var autoCompleter3 = new GvaScript.Autocompleter( [{label: "foo", value: "f", otherValue: 123}, {label: "bar", value: "b", otherValue: 456}, ...], options); var autoCompleter4 = new GvaScript.Autocompleter( myCompletionFunction, options); Then, in HTML : =head1 DESCRIPTION Component designed both as an "autocompleter" (anticipating further key events by users) and as a replacement for HTML C and user has typed C in the input field, then an Ajax request will be sent to C. The server should return a JSON array, in the format explained below. =item a callback function That function will be called, with the current value of the field as single argument. =item an array The array is taken as in-memory datasource. The returned suggestion list is either the complete array (when C is true) or just the list of items that are prefixed by the current value of the field. See also C. =back =head3 Format of suggestions returned by datasources Datasources should return a list of suggestions in the form of a Javascript array (in case of Ajax requests, the response should be a JSON body containing a single array). For each suggestion in the array, the autocompleter needs a I