Adobe ACROBAT FORMS JAVASCRIPT OBJECT Specification page 49

Adobe acrobat version 4.0
Table of Contents

Advertisement

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, and
Acrobat Forms - JavaScript Object Specification
insertItemAt
field methods.
49

Advertisement

Table of Contents
loading

This manual is also suitable for:

Acrobat forms javascript object specification

Table of Contents