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)
multiselect -deselect
pammi
I have a dropdown i am getting selected data with the below code.
var index = IWDatacapture.getItem("/Site").getValue();
var option = IWDatacapture.getItem("/Site").getOptions();
var value = option[index].value;
I am wondering how to de select the selectes value from the this multiselect list /Single select list ?
this list populated using inline command with option multiselect ='t'
Thanx in advance
Find more posts tagged with
Comments
Sri
Hi,
I think you can try using IWItem.removeOption() and IWItem.addOption(), Other than this I don't think there is any method in FormAPI that supports de-selection of an already selected item.
Sri
JonathonG
Alternately, since you have gotten the options array, and the selected index already, you could just use setOptions after setting the option to deselected:
var index = IWDatacapture.getItem("/Site").getValue();
var option = IWDatacapture.getItem("/Site").getOptions();
var value = option[index].value;
option[index].selected = false
IWDatacapture.getItem("/Site").setOptions(option);
Jonathon
Independent Interwoven Contractor