Updating a ComboBox options list
I created a PDF with two ComboBoxes, call them A and B. I want the selection of A to alter the content of B. I have some other (hidden) ComboBoxes, whose names correspond to the values of A, and when the user selects a value in A, that ComboBox's options list should be copied to the B.
The Javascript I use (when a selection in A is made) is:
var Val = this.getField("A").value;
var c1 = this.getField(Val);
var B = this.getField("B");
B.clearItems();
for (var i=0; i < c1.numItems; i++) {
B.insertItemAt ( c1.getItemAt(i, false), c1.getItemAt(i, true), -1 );
}
(I would have been simpler to use B.SetItems(c1.getItems) or something like that, but I don't think there's a method like getItems, right?)
The lists are about 2000 items longs, and each time I select a value in A, Acrobat gets stuck for about a minute or more. Except that it works fine.
Is there any way to speed tup the process?
Thanks!
