Answered
I have 5 comboboxes and I would like to populate each of them when the form is open with numbers 0 to 100 at increments of 5 (0, 5, 10 ,15, etc...) This is what I have.
function POPULATE_WEIGHTING()
{
// CREATING ARRAY OF WEIGHTING FIELDS
var WEIGHTING_ARRAY = new Array(
this.getField("Weighting.1"),
this.getField("Weighting.2"),
this.getField("Weighting.3"),
this.getField("Weighting.4"),
this.getField("Weighting.5"));
// POPULATE WEIGHTING FIELDS
for (i = 0; i < WEIGHTING_ARRAY.length; i++)
{
for (a = 0; a < 21; a++)
{WEIGHTING_ARRAY[i] = new Option(a * 5 + "%",a * 5)};
};
}
I know that POPULATE WEIGHTING FIELDS is not correct. What is the correct method?
Thanks.
-1 adds it at the end of the list, 0 (default) adds it to the top.
The FAQ thread in this forum has a link to the Javascript for Acrobat API Reference: get it, use it. Normally I would say "love it" but it feels a bit spotty in places.