I have a form where I populate a combo-box using document JavaScript. This form was developed using Acrobat X Pro. I used the method setItems() for this purpose. Now when I open the form in Reader 9.0 but the method setItems() does not work. I replaced the method with insertItemAt() which does work in Reader 9.0. This method accepts 3 parameters,
cmb.insertItemAt(valueString, exportValue, index)
The problem is if I use anything except a string in double-quotes("string") this method does not work. I tried using all the following options,
//This works. -1 is for adding the item at the end of list.
cmb.insertItemAt("AddThis", "AddThis", -1);
cmb.insertItemAt("AddThis", 0, -1);
//This does not work.
var str = "AddThis";
cmb.insertItemAt(str.toString(), 0, -1);
cmb.insertItemAt(String(str), 0, -1);
cmb.insertItemAt(str.valueof(), 0, -1);
cmb.insertItemAt(myArr[0], 0, -1)//Tried all above with array also.
Can anyone please help me out. Any help is appreciated. Thank you.