I have found an example of exactly what I want to do, except that it is done in LiveCycle and my form is made in Acrobat. The document is titled "Manipulate values in a drop-down list" and I want to do this example:
"2. Populate a list box with the value selected from a drop-down List
Instructions
Select an item from DropDownList2.
The value of the item selected is added to ListBox1.
Script - change event of DropDownList2
ListBox1.addItem(xfa.event.newText);
DropDownList2 is the name of the combo box.
ListBox1 is the name of the list box."
Can someone tell me how to do the same thing in Acrobat (I have 9 Professional)?
A working approach to populate list boxes or combo boxes is to prepare an appropriage two-dimensional array and then use the setItems() method.
Yes, it is kind of "shifting the problem to another one", but array handling is normally easier to accomplish..
Hope this can help.
Max.