I have following code developed using Acrobat Pro 10.1.1
var arrLevelOptions_Left = new Array();
arrLevelOptions_Left[0] = "Left";
arrLevelOptions_Left[1] = "Right";
function SetSideValues()
{
var cmbSide = this.getField("SideDropDown");
cmbSide.clearItems();
var SideOptions11 = new Array();
arrSideOptions11[0] = "Left";
arrSideOptions11[1] = "Right";
cmbSide.setItems(arrSideOptions11); //Code Works fine till this point.
//cmbSide.setItems(arrLevelOptions_Left);//This gives Error.
app.alert(arrLevelOptions_Left);// Shows "undefined"
}
I can run this code without error in Acrobat X Pro 10.1.1 but when I try to open this PDF in Reader 9.0 following error is thrown,
arrLevelOptions_Left has no properties
206:AcroForm:SideDropDown:KeystrokeException in line 206 of function SetLevelValues, script Document-Level:MainScript
Line: 70: Code: -36(0xffdc): Not implemented
Line: 70: Code: -36(0xffdc): Not implemented
The line number mentioned in the error message belongs to the line commented out in above code.
What I can not grasp is how come the function is able to access only the array defined inside the function and not the global array. Can anyone please throw some light on this issue? Thanks in advance.