6

This Question is bit broad, I did enough research and asking here so that I can get at least some suggestions.

I am trying to set up auto complete textbox/textarea dictionary suggestions. I have tried to setup auto-complete from JSON data from server and I am able to do that.. But here my question is, Can I set up a textarea with auto suggest from dictionary words like when we are entering some text in Word processor. Is it possible through any API available?

Exception
  • 8,111
  • 22
  • 85
  • 136

4 Answers4

5

You could try Google Places Autocomplete API. Here's some related SO thread. I can't find any official documentation to the Google Search Autocomplete API, thankfully someone already did the research for us. Follow instructions there, it shouldn't be too difficult to set-up (looks rather straight forward with both JSON and XML notated responses).

Community
  • 1
  • 1
  • For anyone else coming here ~7 years later, the "did the research for us" link is now here: https://shreyaschand.com/blog/2013/01/03/google-autocomplete-api/ – emilaz May 21 '21 at 13:34
4

I am sure you would have find many ways to achieve autocomplete on TextArea. To name a few

Both the framework and function are rich enough.

Coming on the dictionary API's

API page for altervista

Few others are

Manish Singh
  • 3,463
  • 22
  • 21
2

Well, if you do have access to a JSON response from some server, you could use jQuery. http://jqueryui.com/autocomplete/

$(function() {
  function log( message ) {
    $( "<div>" ).text( message ).prependTo( "#log" );
    $( "#log" ).scrollTop( 0 );
  }

  $( "#birds" ).autocomplete({
    source: "search.php",
    minLength: 2,
    select: function( event, ui ) {
      log( ui.item ?
        "Selected: " + ui.item.value + " aka " + ui.item.id :
        "Nothing selected, input was " + this.value );
    }
  });
});
martriay
  • 5,632
  • 3
  • 29
  • 39
  • I don't have any JSON object at my server side. I am looking for API like wordnik.com – Exception Feb 18 '13 at 04:51
  • And can't you use the wordnik api in your server? Make sure you've got an url to perform the AJAX call (you can use http://developer.wordnik.com/ in your server) and then use the jQuery call in my answer. – martriay Feb 18 '13 at 04:56
1

use jQuery with your dictionary function.... http://jqueryui.com/autocomplete/

you can download it from here

http://jquery.com/download/

Amrendra
  • 2,019
  • 2
  • 18
  • 36