Login   Register  
PHP Classes
elePHPant
Icontem

File: appz/autosuggest/statessuggestionprovider.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/autosuggest/statessuggestionprovider.js  >  Download  
File: appz/autosuggest/statessuggestionprovider.js
Role: Auxiliary data
Content type: text/plain
Description: USA States Suggestion Provider Script
Class: pAjax
Do RPC calls from the browser without page reloads
Author: By
Last change:
Date: 9 years ago
Size: 589 bytes
 

Contents

Class file image Download
function StatesSuggestionProvider() {
    pAjax.apply(this);

    this.controller = null;
    this.typeAhead = true;
}


var _p = StatesSuggestionProvider.prototype = new pAjax;


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

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


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