In HTML, the script element places a script inside the HTML page. In the case of XFDL forms, the script includes the form itself. There are a number of attributes that modify the script element. These attributes help the Viewer to recognize the embedded form as valid XFDL. They include:
This value must always be XFDL
. For example:
Identifies the object referred to by the script. This id must match the object's XFDLID value. For example, if your XFDLID value is:
<PARAM NAME="XFDLID" VALUE="XFDLData">
then your script id must be:
attribute has five parameters:
- mime type — This value must always be application/vnd.xfdl.
- wrapped — Identifies the type of container that encloses the form. This value must always be comment.
- next-chunk — Indicates the next portion of the form. If used, this value must be the script id of the next portion of the form.
- encoding — The encoding of the form embedded in the script element. For example, if the form is base64 encoded, then the value is base64.
- content-encoding — The encoding of the character set of the form. The default is UTF-16.
<SCRIPT type="application/vnd.xfdl; wrapped=comment;
encoding=base64; next-chunk=Part2; content-encoding=utf-16">
These parameters must be separated with a semi-colon followed by a space.
The following example displays a script starting tag, complete with all of the required attributes:
<SCRIPT language="XFDL" id="XFDLData"
For more information about the HTML script element, see http://www.w3.org/TR/REC-html40/interact/scripts.html
Parent topic: Embedding a form