I need some ajax code to do some functions with drop down.
I have three table of values one for country, then state and city.
And i have three dropdown to show these values
first it should show
select country
select state
select city
in that drop downs(slect) respectively.
when i select united states from the first dropdown
in the second drop down it must show the states of the united states.
and again when i select a state from the state dropdown
it must show the cities of that state in the third dropdown(city)
I want to do this with ajax.
can any one have a code to do this.
please help me.
Thanks
1) create 3 tables in db
2) now create 3 webservices
which sends data in json format
3) now on html page
create three select box and bind onchange event on each select box (except for city select), that event will send countryId for getStates Webservcie and stateId for getCities webservice. and bind received json states in state select box and cities in city select box