Last reviewed: 3/23/2024 12:29:14 PM
<object>
An <object> element interacts with a custom extension.
Syntax
<object archive="uri1 ..."
classid="uri"
codebase="uri"
codetype="codetype"
cond="expression"
data="uri"
expr="expression"
fetchhint="fetchtype"
fetchtimeout="secondsormilliseconds"
maxage="seconds"
maxstale="seconds"
name="var"
type="contenttype" />
Attributes
archive
A space-separated list of URIs for archives containing resources relevant to the object, which may include the resources specified by the classid and data attributes. URIs which are relative are interpreted relative to the codebase attribute.
classid
The URI specifying the location of the object's implementation. The URI conventions are platform-dependent.
codebase
The base path used to resolve relative URIs specified by classid, data, and archive. The default value is the base URI of the current document.
codetype
The content type of data expected when downloading the object specified by classid. The default value is the value of the type attribute.
cond
An expression that must evaluate to true after conversion to boolean in order for the form item to be visited.
data
The URI specifying the location of the object's data. If it is a relative URI, it is interpreted relative to the codebase attribute.
expr
The initial value of the form item variable; default is ECMAScript undefined. If initialized to a value, then the form item will not be visited unless the form item variable is cleared.
fetchhint
Defines when the interpreter context should retrieve content from the server. If not specified, a value derived from the innermost relevant fetchhint property is used. The default value is the objectfetchhint property.
Fetch Type | Description |
---|---|
prefetch | Indicates a file may be downloaded when the page is loaded. |
safe | Indicates a file that should only be downloaded when actually needed. |
fetchtimeout
The interval to wait for the content to be returned before throwing an error.badfetch event. The value is a Time Designation. The default value is the fetchtimeout property.
maxage
Indicates that the document is willing to use content whose age is no greater than the specified time in seconds. The document is not willing to use stale content, unless maxstale is also provided. If not specified, a value derived from the innermost relevant maxage property, if present, is used. The default value is the objectmaxage property.
maxstale
Indicates that the document is willing to use content that has exceeded its expiration time. If maxstale is assigned a value, then the document is willing to accept content that has exceeded its expiration time by no more than the specified number of seconds. If not specified, a value derived from the innermost relevant maxstale property, if present, is used. The default value is the objectmaxstale property.
name
When the object is evaluated, it sets this variable to an ECMAScript value whose type is defined by the object.
type
The content type of the data specified by the data attribute.
Children
<audio>, <catch>, <enumerate>, <error>, <filled>, <help>, <noinput>, <nomatch>, <param>, <prompt>, <property>, and <value>.
Parents
Variables
none
Example
The following example illustrates using an object to invoke external processes.
<object
name="debit"
classid="method://credit-card/gather_and_debit"
data="http://www.recordings.example.com/prompts/credit/jesse.jar">
<param name="amount" expr="document.amt"/>
<param name="vendor" expr="vendor_num"/>
</object>
Version Information
Supported in: VoiceXML 1.0, VoiceXML 2.0, and VoiceXML 2.1.