Hello, I have DCT which has some select box (dropdown) and required dynamically make selection base on folder. I can catch everything, but how can I select properly some element from dropdown.
[HTML]
[/HTML]
When I tried this code (below) it almost works, but selection is not right. When I alert correct one it show properly.
function setSelection(path, sobj) {
var options = sobj.getOptions();
var newOptions = new Array();
for (var a in options) {
if (path == options.value) {
newOptions = new Option(options.text,options.value,false,true);
// alert("Selected : " + options.text);
} else {
newOptions = new Option(options.text,options.value,false,false);
}
}
sobj.setOptions(newOptions);
}
It would be a great help if someone could suggest some idea to solve this problem.