PHP Classes

File: appz/autosuggest/colorssuggestionprovider.js

Recommend this page to a friend!
  Classes of Guilherme Blanco   pAjax   appz/autosuggest/colorssuggestionprovider.js   Download  
File: appz/autosuggest/colorssuggestionprovider.js
Role: Auxiliary data
Content type: text/plain
Description: Colors Suggestion Provider Script
Class: pAjax
Do RPC calls from the browser without page reloads
Author: By
Last change:
Date: 18 years ago
Size: 732 bytes
 

Contents

Class file image Download
function ColorsSuggestionProvider() { pAjax.apply(this); this.controller = null; this.typeAhead = true; } var _p = ColorsSuggestionProvider.prototype = new pAjax; _p.requestSuggestions = function (oAutoSuggestController, bTypeAhead) { this.controller = oAutoSuggestController; this.typeAhead = bTypeAhead; // Only display suggestions after at least 3 chars in the textbox if (this.controller.textbox.value.length > 2) { var req = this.prepare("suggestColors", pAjaxRequest.POST); req.setParam("text", this.controller.textbox.value); req.async(); } } _p.onLoad = function () { this.controller.autoSuggest(this.getResponse(), this.typeAhead); }