In your code you need to write all the handlers when you make a choice, and you need to request JSON objects according to the input parameter and fill in your subsequent drop-down lists, for example, you made a country. In this case, you have all the client-side data in JSON. Usually this kind of data is in the database, so you need to get it from the server.
You can do this with the jQuery Autocomplete Widget .
The first choice allows you to enable only auto-complete the country.
After the user has made a choice, you will set the state source in javascript (pass the Country parameter to the method, and when the user enters, you fill in the value from the server in accordance with the country parameter).
When the user has made selection 2., you turn on the third autocomplete and set the input parameter "state" and fill in the values corresponding to the values in the autocomplete of the city.
source share