Avatar

Level 10

Hi,

Try this JavaScript in the preOpen event of the city dropdown (which I have called CitiesDropDown and called the provinces one ProvincesDropDown)

var cities = [];

switch (ProvincesDropDown.rawValue)

{

    case "Alberta":

        cities = ["A", "B", "C"];

        break;

    case "Toronto":

        cities = ["D", "E", "F", "G"];

        break;

    case "Manitoba":

        cities = ["H", "I", "J", "K"];

        break;

}

CitiesDropDown.clearItems();

cities.forEach(function(element) { CitiesDropDown.addItem(element); });

Regards

Bruce