Showing posts with label Typeahead. Show all posts
Showing posts with label Typeahead. Show all posts

Friday, January 22, 2010

Facebook Typeahead Input

The new fbml version which is 1.1 has included an Ajax Typeahead object as a FBML tag. So it is not necessary to create our own javascript to implement the typeahead object. You can implement the feature using a code like this

   1: <fb:fbml version="1.1">
2:Service Provider :<fb:typeahead-input name="serviceProvider" autocomplete="off" >
   3:     <fb:typeahead-option value="mob" >Mobitel</fb:typeahead-option>
   4:     <fb:typeahead-option value="dia" >Dialog</fb:typeahead-option>
   5:     <fb:typeahead-option value="tig" >Tigo</fb:typeahead-option>
   6:     <fb:typeahead-option value="hut" >Hutch</fb:typeahead-option>
   7:   </fb:typeahead-input>
   8: </fb:fbml>



After adding above code, the resulting input element will be like this

image