Domanda

As my requirement, getting auto suggestion values along the total number of list from the database.

For Ex: if I type "Lon", on loading it's should display as London,United Kingdom(60 properties) where 60 is the dynamic values and the total list in the London location from the database.

For Reference: http://www.wimdu.com/

In this site search option auto suggestion exactly I need.

How could I get the auto suggestion values like this?

Thanks in Advance..

È stato utile?

Soluzione

Using PHP, fetch data from the database and do

json_encode($data);

Use jQuery AJAX to read this data. And then use jQuery UI Autocomplete Plugin.

Altri suggerimenti

There are multiple options available. You can also look for Twitter typeahead.js

Check for NBA and NHL Teams example, hope this suffice.

http://twitter.github.io/typeahead.js/examples/

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top