Places

 

  • Download
  • Documentation
  • Forums
  • Demo
  • Contact
  • Blog
  • My account

Meteora

Javascript Widgets

Controls

  • Autocomplete
  • Bubble
  • Calendar
  • Carousel
  • Datagrid
  • Dialog
  • Editor
  • Filebrowser
  • Form Control
  • Menu
  • Notebook
  • Picbox
  • Popup
  • Searchlist
  • Selection
  • Spinbutton
  • Tablesort
  • Toolbox
  • Treeview

Features

  • JsonRpc Core

Effects

  • Visual effects

Control.Autocomplete

Widget demo

Type the first two or three letters of your country of origin, in English.

Result

</p>

HTML source

<input name="q" type="text" id="autocomplete_demo_input"/>
<span id="result-wrapper" style="display: none">
  <h4>Result</h4>
  <span id="result"></span>
</span>

Javascript source


Meteora.uses('Control.Autocomplete');

Meteora.onStart(
  function () {
    new Autocomplete(
      'autocomplete_demo_input',
      {
        'action': '/demo/ajax_search',
        'onClick': function(data) {
          $('result').setContent(Widget.fromHTML('<b>Country name:</b> '+data.content+', <b>Code:</b> '+data.index));
          $('result-wrapper').show();
        }
      }
    );
  }
);

JSON response

{
  "AF":"Afghanistan",
  "AL":"Albania",
  "DZ":"Algeria",
  "AS":"American Samoa",
  "AD":"Andorra",
  "AO":"Angola",
  "AI":"Anguilla",
  "AQ":"Antarctica",
  "AG":"Antigua and Barbuda",
  "AR":"Argentina"
}

Documentation

If you're looking for more documentation about this widget, you may want to read Control.Autocomplete documentation

Powered by textmotion

(c) 2008 Astrata Software