How to make Chained comboboxes with autocomplete, without reloading the page auto complete data should come from db table.
Asked
Active
Viewed 708 times
1 Answers
0
Use Select2
Basically, you set up server to accept a query on some URL, and return json. Then you configure Select2 to use that URL.
This is the official page of Select2. It has example code for this.
http://ivaynberg.github.com/select2/
For chained comboboxes, try something like this:
$('country_box_selector').on('change', function(){
update_states($(this).val())
})
update_states = function (country) {
// Fetch and replace states based on passed country
}

Prabhakar Bhat
- 11
- 1
- 3
-
Thank you... I have done the same thing by using jquery ui autocomplete combobox. I am getting data to one combobox but I am facing problems while changing the data of second combobox when i select a option in first combobox. I need two comboboxes, One is Country and another one is State. When I select a country in first combobox, in second combobox states of first combobox should come. – Sudarshan G Hegde Mar 06 '13 at 17:13