Contains the classes for the Remote methods for Autocompleter.
| Autocompleter. Remote.js | Contains the classes for the Remote methods for Autocompleter. |
| Autocompleter.Ajax | Contains the classes for the Remote methods for Autocompleter |
| Autocompleter. Ajax.Base | The base functionality for all Autocompleter.Ajax functionality. |
| Properties | |
| queryResponse | Inherated classes have to extend this function and use this.parent(resp) |
| Autocompleter. Ajax.Json | Extends Autocompleter.Ajax.Base to include Json support. |
| Autocompleter. Ajax. Xhtml | Extends 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 * |
Contains the classes for the Remote methods for Autocompleter
| Author | Harald Kirschner <mail [at] digitarald.de> |
| Refactored by | Aaron Newton <aaron [dot] newton [at] cnet [dot] com> |
| License | MIT-style license |
| Version | 1.0rc3 |
| Source | http://digitarald.de/project/autocompleter/ |
| Mootools 1.1 | <Class.Extras>, <Element.Event>, <Element.Selectors>, <Element.Form>, <Element.Dimensions>, Fx.Style, Ajax, Json |
| Autocompleter | Autocompleter.js, Observer.js |
The base functionality for all Autocompleter.Ajax functionality.
| el | (DOM element or id) element to observe. |
| url | (string) the url to query for values |
| options | (object) key/value set of options. |
| postVar | String, default ‘value’. Post variable name for the query string |
| postData | Object, optional. Additional request data |
| ajaxOptions | optional Options Object. For the Ajax instance |
| onRequest | Event Function. |
| onComplete | Event Function. |
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.
| Properties | |
| queryResponse | Inherated classes have to extend this function and use this.parent(resp) |
Inherated classes have to extend this function and use this.parent(resp)
| resp | (String) the response from the ajax query. |
Extends Autocompleter.Ajax.Base to include Json support.
All those specified in Autocompleter.Ajax.Base and Autocompleter.Base.
new Autocompleter.Ajax.Json($(‘ajaxJson’), ‘server/auto.php’ { postVar: ‘query’ });
Extends Autocompleter.Ajax.Base to include Xhtml support.
All those specified in Autocompleter.Ajax.Base and Autocompleter.Base.
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));
}
});