My project allows the user to select their State, County, and City. Once the user selects State, it generates the Counties that the user can select. This also happens for City. Currently, the list of cities doesn't display all of the cities. What is my loadCities
method doing wrong?
Issue: my
loadCities
function is not displaying all of the cities available.
My loadCounties function is working as expected:
function loadStates(){
// This is working correctly
}
My loadCounties function is also working correctly:
function loadCounties(stateId){
// This is working correctly
}
The error is occuring in my loadCities function:
function loadCities(countyId, stateCode, countryCode) {
var cityUrl, cityData;
cityUrl = WorkLocation.ListOfCityJsonUrls;
cityData = { countyId: countyId };
$.ajax({
url: cityUrl,
data: cityData,
type: 'GET',
success: function(result) {
var key = "dataForCity_" + currentWorkArea("countyselected").data("id");
setWorkAreaData(key, data);
bindCityData();
syncSelections(countyId, 3);
}
});
}