Hey, if it worked, then I would not waste my time writing this page.
Overview
This page is based on that experience (disaster).
Adobe Acrobat forms are designed in Adobe LiveCycle Designer. I don't know how many of these problems are Acrobat and how many are LiveCycle Designer, but it does not really matter. If a developer has to analyze problems to that level, then it is time to find a different language.
The examples (and problems) discussed on this page were tested in Acrobat 7 and/or 8.
Displaying a DialogBox
In JavaScript, the following code will display a dialogBox.
alert("any text"); |
app.alert("any text"); |
The following also works (but don't bother looking for a reference in the help ... I never found any for this either).
xfa.host.messageBox("any text"); |
Most object oriented languages provide a visible property for form components. Adobe Acrobat provides presence ... but
That's right, when the subforms are hidden, some components are hidden and others are not. This is the only programming language I know with this kind of defect.
Of course, I searched for help ... and found none.
It is possible that there is another property that should be used, or whatever. But the code we are using was from some book ... or we would have never gotten this far.
Caption Property
Warning:[object XFAObject] |
This means that caption is actually an object that has its own properties. So instead of
xxx.caption = "Hello World"; |
xxx.caption.value = "Hello World"; |
Of course, I checked the (worthless) help and found nothing.
Technical Background
In 2002, Adobe bought what was known as JetForms and added XFA support to Acrobat 6 in 2003. These forms are edited in Adobe LiveCycle Forms Designer only and can not be edited in Adobe Acrobat 6 or 7. The forms will not work with versions of Acrobat Reader before version 6.
Calling this bastard of a language JavaScript is borderline fraud. I know a little JavaScript and can not create a simple program in this.
On top of that, the provided help sucks (a technical term that means totally worthless). Even that could be excused if there was reasonable help on-line ... but I never found any.
My advice, avoid Acrobat!
Author: Robert Clemenzi - clemenzi@cpcug.org