Adobe acrobat forms javascript object specification User Manual

Page of 64
Acrobat Forms - JavaScript Object Specification
29
Use this function to scroll the current page to the location specified by xOrigin and yOrigin.
These coordinates must be defined in user space. Please refer to the
for more details on the user space coordinate system.
spawnPageFromTemplate
Parameters: cTemplate, [nPage], [bRename], [bInsert]
Returns: nothing
Use this method with a template name, such as the ones returned by
. The
optional parameter nPage, represents the page number (zero-based) into which the template
will be spawned. If that page already exists, then the template contents are appended to that
page. If nPage is omitted, a new page is created at the end of the document. The optional
parameter bRename, is a boolean that indicates whether fields should be renamed. The default
for bRename is true.
Example:
var n = this.numTemplates;
var cTempl;
for (i = 0; i < n; i++) {
cTempl = this.getNthTemplate(i);
this.spawnPageFromTemplate(cTempl);
}
Addition
If bInsert is specified then the template is inserted before the page specified by nPage as
opposed to being overlaid on top of that page. The default for bInsert is false.
submitForm
Parameters: cURL, [bFDF], [bEmpty], [aFields], [bGet]
Returns: nothing
Use this method to submit the form to a specific URL. The first parameter, cURL, is the URL
to submit to. This string must end in “#FDF” if the result from the submission is FDF and the
document is being viewed inside a browser window.
The optional bFDF parameter is a boolean that indicates to submit as FDF or HTML. If set to
true, the default, it submits the form data as FDF. If false, it submits it as HTML (URL
encoded).
The optional bEmpty parameter is a boolean that indicates, when true, that all fields are
submitted, including those that have no value and if false to exclude those that currently have
no value. The default for bEmpty is false.
4.0