Last reviewed: 3/23/2024 12:17:26 PM
<goto>
A <goto> element transitions to another form item in the current form, another dialog in the current document, or another document.
Syntax
<goto expr="expression"
expritem="expression"
fetchaudio="uri"
fetchhint="fetchtype"
fetchtimeout="secondsormilliseconds"
maxage="seconds"
maxstale="seconds"
next="uri"
nextitem="string" />
Attributes
expr
An ECMAScript expression that yields the URI.
expritem
An ECMAScript expression that yields the name of the next form item to visit.
fetchaudio
The URI of the audio clip to play while the fetch is being done. If not specified, the fetchaudio property is used, and if that property is not set, no audio is played during the fetch. The fetching of the audio clip is governed by the audiofetchhint, audiomaxage, audiomaxstale, and fetchtimeout properties in effect at the time of the fetch. The playing of the audio clip is governed by the fetchaudiodelay, and fetchaudiominimum properties in effect at the time of the fetch. The default value is the fetchaudio property.
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 documentfetchhint 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 documentmaxage 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 documentmaxstale property.
next
The URI to which to transition.
nextitem
The name of the next form item to visit in the current form.
Children
none
Parents
<block>, <catch>, <error>, <filled>, <help>, <if>, <noinput>, <nomatch>, and <prompt>.
Variables
none
Example
The following example illustrates using example elements.
<goto nextitem="ssn_confirm"/>
<goto expritem="(type==12)? 'ssn_confirm' : 'reject'"/>
<goto next="#another_dialog"/>
<goto expr="'#' + 'another_dialog'"/>
<goto next="http://flight.example.com/reserve_seat"/>
<goto next="./special_lunch#wants_vegan"/>
Version Information
Supported in: VoiceXML 1.0, VoiceXML 2.0, and VoiceXML 2.1.