Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How to change the Drop down value in DCT using the Form API
atyagi
Hi,
In my DCT i have 2 container. I have one dropdown box in root container and one in child container. I want, when i select the dropdown value from the root container then same value should be display into the child container dropdown box.
Please find the attachment of the DCT and js file.
Please give me any pointer on this.
Find more posts tagged with
Comments
ACheethayil
You can read root drop down value as
strValue = eval("IWDatacapture.getItem('" + strItemName + "').getOptions()[IWDatacapture.getItem('" + strItemName + "').getValue()].value" );
Then you can iterate thru the child drop down and set it as that value by making it selected. I am just adding a sample to iterate thru the child one so that you can reformat this for use.
var selectedArray = new Array();
if (eval("IWDatacapture.getItem('" + strItemName + "').getOptions()") != null)
{
var selObj = IWDatacapture.getItem(strItemName).getOptions();
var i;
var count = 0;
for (i=0; i {
# Set it here and do what you want
}
}