on 05-13-2010 3:48 PM
I am using Adobe Live cycle designer with javascript adding items to list box as
listbox.addItem("test","1");
while retrieving the lisbox values... am using
oField.items.nodes.item(k).value
so I am getting output as "test"
now I want to retrieve 1..
i tried using
oField.items.nodes.item(k).text && oField.items.nodes.item(k).rawValue
but this didnt work
Please suggest.
Try the following code:
var lbValues = listbox.rawValue.split("\n"); " Now all the values are in lbValues array
for (var i = 0; i < lbValues.length; i++)
{
xfa.host.messageBox(lbValues\[ i \]);
}
Thanks,
Chandra Indukuri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why do you need the index?
In the list box if the user can't select more than one entry then you can simply use: listbox.rawValue to get the selected value.
The sample code I wrote in my previous thread was to retrieve all the selected values if the user can select more than one.
Please close the thread if your issue has been resolved.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.