Login   Register  
PHP Classes
elePHPant
Icontem

File: appz/type_ahead/suggestionprovider.js

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Guilherme Blanco  >  pAjax  >  appz/type_ahead/suggestionprovider.js  >  Download  
File: appz/type_ahead/suggestionprovider.js
Role: Auxiliary data
Content type: text/plain
Description: Suggestion Provider Script
Class: pAjax
Do RPC calls from the browser without page reloads
Author: By
Last change:
Date: 2005-09-13 19:35
Size: 485 bytes
 

Contents

Class file image Download
function SuggestionProvider() {
    pAjax.apply(this);
    
    this.controller = null;
}


var _p = SuggestionProvider.prototype = new pAjax;


_p.requestSuggestions = function (oAutoSuggestController) {
    this.controller = oAutoSuggestController;

    var req = this.prepare("suggest", pAjaxRequest.POST);
    req.setParam("text", this.controller.textbox.value);
    req.async();
}


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