I have a listbox field that gets it’s value through a dblookup that returns a field. The field has ‘some text | text’. The user of course sees ‘some text’ and Domino stores ‘text’.
I need to somehow get the text of the listbox into a text field. My problem is the list box allows multi values.
If I use document.forms[0].field.options[document.forms[0].field.selectedIndex].text, I get the text unless more than one option is selected.
I appreciate any help.
Thanks
Subject: Listbox on web
Hi James,You need to loop through all the field values of the multivalues selection field and check which values are selected.I am giving a sample below
doc = document.forms[0];
var nLen = doc.multivaluefieldname.length;
radval = “”;
for (var i = 0; i < nLen; i++)
{
if(doc.multivaluefieldname.options[i].selected== true)
{
if (radval == “” )
{
var radval = doc.multivaluefieldname.options[i].text;
}
else
{
var radval = radval +“,”+ doc.multivaluefieldname.options[i].text;
}
}
}
Subject: RE: Listbox on web
Thank You!! It is working just fine.