New Forum | Previous | Next | (P-PDF) Beginners
Conf: (P-PDF) Beginners, Msg: 111540
Date: 5/15/2004 07:55 PM
Actually, there might be am even more efficient approach.
very fast. Therefore, defining and initializing arrays at document
level is not such a bad thing, and it is very easy to maintain arrays
at document level too.
One thing which already could speed things up in comparision to the
instant array creation approach described here would be an implicit
array definition, which means that instead of a text string which then
gets chopped up into array elements (using the split() method) uses a
string which is already an array. that would look somewhat like this:
display option export value
"ALB" ["7601 Bluewater NW", "Albuquerque", "NM",
And then refer to the the individual elements of the export value.
The next speed-up (IMHO) would be using the popUpMenu() method, because
if it is "only" for selecting something, with no further display
information need, this approach would be faster than dealing with a
Combo Box field.
To prepare for that case, you would instead define your location array
as document level array, and keeping the information in a consistent
manner. In order to keep things together, you would create a
multi-dimensional array, where for example your address information is
formed as an array (such as above), and itself it is an element of the
locations array. Then you could build up the selection list
instantaneously, whenever you need it. You would then either return the
index of the element in the master array, and use that one to refer to
the individual pieces, or you would return the whole address array and
refer to that one.
If you can freely work with Acrobat 6, things got even easier, as you
now have a few more options with popup menus.
Also note that it is easier to organize information in a popup menu,
because it would allow for hierarchical menus, avoiding those annoying
long 1-dimensional combo boxes.
Hope, this can help.
Low Paper workflows, Smart documents, PDF forms
CH-8906 Bonstetten, Switzerland
Phone: +41 1 700 29 21
Fax: +41 1 700 20 37
or +1 815 425 6566
[ Building Bridges for Information ]
My next conference appearances and workshops:
• Conference presentations at the 2004 Symposium of the BFMA, May 23
27 in Reno, Nevada (http://www.bfma.org) and pre-/post-conference
workshop, May 22/23 and 27, organized by essociates Group
• During the Symposium, I will be available to attendees for ad-hoc
consulting at a hourly basis; please contact me in private for
• And, as always, available for on-site
> If I can make a suggestion, you could use a completely different
> that might be easier to manage.
> Add the options to your destination combo box as follows
> display option export value
> "ALB" "7601 Bluewater NW~Albuquerque, NM
> "ATL" "1800 James Pkwy NW~Atlanta, GA
> then use this basic JS to populate the other fields
> var des = this.getField('destination');
> var strt = this.getField('street');
> var csz = this.getField('citystatezip');
> var phn = this.getField('phone');
> var desArr = des.valueAsString.split("~")
> strt.value = desArr;
> csz.value = desArr;
> phn.value = des;
> Its another way of getting where you want to go without
> having to manage all those separate arrays !