PHP Classes

File: appz/autosuggest/colorssuggestionprovider.js

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  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: 10 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); }