EasyManua.ls Logo

Adobe ACROBAT FORMS JAVASCRIPT OBJECT - Field Methods; setItems

Adobe ACROBAT FORMS JAVASCRIPT OBJECT
64 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Acrobat Forms - JavaScript Object Specification
49
Returns: nothing
This method sets the list of items for a combo box or a list box. The single parameter necessary
to call this method must be an array. Each element in the array must either be an object
convertible to a string or another array. If the element can be converted to a string, the user and
export values for the list item are equal to the string. If the element is an array it must consist
of two sub-elements. The first sub-element should be convertible to a string which will be used
as the user value, the second element will be used as the export value.
var l = this.getField("ListBox");
l.setItems(["One", "Two", "Three"]);
var c = this.getField("StateBox");
c.setItems([["California", "CA"],["Massachusetts", "MA"],["Arizona", "AZ"]]);
var c = this.getField("NumberBox");
c.setItems(["1", 2, 3, ["PI", Math.PI]]);
See also the clearItems, getItemAt,andinsertItemAt field methods.

Table of Contents

Related product manuals