Hi,
I have three text fields in a form and two drop downs.what ever the value that i enter in to the three text fileds need to be added to drop down under single region. Thing in my two dropdowns one drop down name if region and another one is state .based on value that is selected in region dropdown states will be populated to state drop down.
Now i want to add a new region and new state.
Adding a new region i am done with it by having a textfild and on clicking of button it will add textfiled value to region dropdown.on click event of button i have this script.
function addItems(ddl)
{
var dropDownItems = [];
dropDownItems.push({displayItem: NewRegion.rawValue}); //,value: BoundValue.rawValue}
for (var i = 0; i < ddl.length; i++)
{
dropDownItems.push({displayItem: ddl.getDisplayItem(i)}); //,value: ddl.getSaveItem(i)}
}
ddl.clearItems();
for (var i = 0; i < dropDownItems.length; i++)
{
var dropDownItem = dropDownItems[i];
ddl.addItem(dropDownItem.displayItem); //, dropDownItem.value
}
}
But i am not geting how to add 3 state values under the newly added region...
Please suggest ..
Thanks in advance
Bharathi