Autocompleter. Remote.js

Contains the classes for the Remote methods for Autocompleter.

Summary
Autocompleter. Remote.jsContains the classes for the Remote methods for Autocompleter.
Autocompleter.AjaxContains the classes for the Remote methods for Autocompleter
Autocompleter. Ajax.BaseThe base functionality for all Autocompleter.Ajax functionality.
Properties
queryResponseInherated classes have to extend this function and use this.parent(resp)
Autocompleter. Ajax.JsonExtends Autocompleter.Ajax.Base to include Json support.
Autocompleter. Ajax. XhtmlExtends Autocompleter.Ajax.Base to include Xhtml support.
Change Log$Source: /cvs/main/flatfile/html/rb/js/global/cnet.global.framework/common/3rdParty/Autocomplete/Autocompleter.Remote.js,v $ $Log: Autocompleter.Remote.js,v $ Revision 1.1 2007/06/12 20:26:52 newtona * empty log message *

Autocompleter.Ajax

Contains the classes for the Remote methods for Autocompleter

Details

AuthorHarald Kirschner <mail [at] digitarald.de>
Refactored byAaron Newton <aaron [dot] newton [at] cnet [dot] com>
LicenseMIT-style license
Version1.0rc3
Sourcehttp://digitarald.de/project/autocompleter/

Dependencies

Mootools 1.1<Class.Extras>, <Element.Event>, <Element.Selectors>, <Element.Form>, <Element.Dimensions>, Fx.Style, Ajax, Json
AutocompleterAutocompleter.js, Observer.js

Autocompleter. Ajax.Base

The base functionality for all Autocompleter.Ajax functionality.

Arguments

el(DOM element or id) element to observe.
url(string) the url to query for values
options(object) key/value set of options.

Options

postVarString, default ‘value’.  Post variable name for the query string
postDataObject, optional.  Additional request data
ajaxOptionsoptional Options Object.  For the Ajax instance
onRequestEvent Function.
onCompleteEvent Function.

Example

The Autocompleter.Ajax.Base class is not used directly but rather its inhertants are (see Autocompleter.Ajax.Json and Autocompleter.Ajax.Xhtml) so there is no example here.

Summary
Properties
queryResponseInherated classes have to extend this function and use this.parent(resp)

Properties

queryResponse

Inherated classes have to extend this function and use this.parent(resp)

Arguments

resp(String) the response from the ajax query.

Autocompleter. Ajax.Json

Extends Autocompleter.Ajax.Base to include Json support.

Arguments

All those specified in Autocompleter.Ajax.Base and Autocompleter.Base.

Example

new Autocompleter.Ajax.Json($(‘ajaxJson’), ‘server/auto.php’ { postVar: ‘query’ });

Autocompleter. Ajax. Xhtml

Extends Autocompleter.Ajax.Base to include Xhtml support.

Arguments

All those specified in Autocompleter.Ajax.Base and Autocompleter.Base.

Example

new Autocompleter.Ajax.Xhtml($('ajaxXhtml'), 'server/auto.php', {
postData: {html: 1}, //some data to go along with the request
//handle the data returned
parseChoices: function(el) {
var value = el.getFirst().innerHTML;
el.inputValue = value;
this.addChoiceEvents(el).getFirst().setHTML(this.markQueryValue(value));
}
});

Change Log

$Source: /cvs/main/flatfile/html/rb/js/global/cnet.global.framework/common/3rdParty/Autocomplete/Autocompleter.Remote.js,v $ $Log: Autocompleter.Remote.js,v $ Revision 1.1 2007/06/12 20:26:52 newtona * empty log message *

All functions are part of the Autocompleter namespace.
Contains the classes for the Remote methods for Autocompleter
The base functionality for all <Autocompleter.Ajax> functionality.
Base class for the Mootools Effects (Moo.Fx) library.
The Style effect; Extends Fx.Base, inherits all its properties.
An Ajax class, For all your asynchronous needs.
Extends <Autocompleter.Ajax.Base> to include Json support.
3rd party script for managing autocomplete functionality.
Observes formelements for changes; part of the <Autocomplete> 3rd party package.
Extends <Autocompleter.Ajax.Base> to include Xhtml support.
Base class for the Autocompleter classes.