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: 15 years ago
Size: 732 bytes


Class file image Download
function ColorsSuggestionProvider() {

    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);

_p.onLoad = function () { this.controller.autoSuggest(this.getResponse(), this.typeAhead); }

For more information send a message to info at phpclasses dot org.