Hi All,Thanks in advance. I am trying to get the data of the selected values of the multiselect select box. Below mentioned is my code and it displays nothing even when i select a value. I am calling this function on item change. Any pointers would be appreciated.Thanks!JenniTS 6.5 Windows[html]function abc(){var UserControlItem1 = IWDatacapture.getItem("/root/UserControlArea1");var ucaval = UserControlItem1.getOptions()[parseInt(UserControlItem1.getValue())].value;var areaOptions = UserControlItem1.getOptions();var numOptions = UserControlItem1.getOptions().length;alert(numOptions);for (var i = 1; i<=numOptions; i++) { if(UserControlItem1.options.selected == 'true'){ alert(i); }}}[/html]
Chances are, you simply have comma(that's a default) - delimited list of Values.Try the following, see what it shows. Note that if you registeredfunction abc(item) { alert(item.getValue());}
I am trying to get the values instead of the array index
function abc(item) { var available_options = item.getOptions(); for (var i=0; i<available_options.length; i++) { if (available_options.selected) { alert(available_options.value); } }}