<goto>

Transfers execution to the specified URI.

Syntax

<goto
    expr = "CDATA"
    expritem = "CDATA"
    fetchaudio = "URI"
    fetchhint = "{prefetch | safe}"
    fetchtimeout = "CDATA"
    maxage = "CDATA"
    maxstale = "CDATA"
    next = "URI"
    nextitem = "CDATA"
/>

Attributes

Attribute

Data Type

Required?

Default

Description

expr

CDATA

no

NA

ECMAScript expression that evaluates to the next dialog URI fragment.

expritem

CDATA

no

NA

ECMAScript expression that evaluates to the next form item to transition to.

fetchaudio

URI

no

NA

URI of an audio resource to play while the next document resource is being fetched. If the fetchaudio attribute is not set, no audio is played during the fetch. The audio is terminated after the next document is fetched.

fetchhint

{prefetch | safe}

no

NA

Specifies when the VoiceXML Interpreter context should retrieve content from the server. Valid values:

  • prefetch = Fetch the resource when the page is loaded.

  • safe = Fetch the resource when it is specifically called by the application.

fetchtimeout

CDATA

no

NA

Time interval to wait for the content to be returned before throwing an error.badfetch event. Use s for seconds (for example, 1s) and ms for milliseconds (for example, 1ms).

maxage

CDATA

no

NA

Maximum acceptable age, in seconds, of a resource being fetched from the cache. Setting maxage to 0 means that a cached version is never considered fresh.

maxstale

CDATA

no

NA

Maximum acceptable staleness, in seconds, of the resource being fetched, if the fetched resource is cached and expired.

next

URI

no

NA

The URI fragment of the next dialog, or URI of the next document to load.

nextitem

CDATA

no

NA

The next form item in the current form to transition to.

Details

The destination of a <goto> operation can be:

Parents

<block>, <catch>, <error>, <filled>, <foreach>, <help><if>, <noinput>, <nomatch>

Children

None.

Example

<?xml version="1.0"?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
    <form id="form1">
        <block name="block1">
            <prompt>Currently in block one</prompt>
            <goto nextitem="block3"/>
        </block>
        <block name="block2">
            <prompt>Now in block two</prompt>
        </block>
        <block name="block3">
            <prompt>Now in block three</prompt>
            <goto next="#form2"/>
        </block>
    </form>
    <form id="form2">
        <block name="block4">
        <prompt>Now in form two</prompt>
        </block>
    </form>
</vxml>

See Also

<submit>