Hi All,
I have a requirement where I need to change the option group values of a dropdown based on another dropdown.
I have a limitation that this needs to be achieved through script and the no call should be made to the server.
I tried using CAF.Select.Item.Model() class, but for some reason this throws an exception in Chrome browser.
I would appreciate any help on this
Below is the sample code I tried.
var fruits = ‘Apple,apple;Mango,mango;Banana,banana’;
var fruitsList = fruits.split(‘;’);
for(i=0;i<fruitsList.length;i++) {
var item = CAF.Select.Item.Model();
var itemVal = fruitsList[i].split(‘,’);
item.setLabel(itemVal[0]);
item.setValue(itemVal[1]);
secdrop.set(i,item);
}
Regards,
Sravan