<goto>

Description

Transitions to one of the following:

 

Document variables will be lost when transitioning to the current document with a URI reference.  For example, if the current document is http://www.voicexml.org/index.vxml, the document variables will be lost if the following syntax is used to transition to the "foo" dialog in the current document:

 

Document variables will be retained when transitioning to the current document with an empty URI reference.  For example, the document variables will be retained if the following syntax is used to transition to the "foo" dialog in the current document:

 

Note: Using a URI to transition to a document will cause the old document's variables to be lost.  Keep this in mind when deciding which syntax to use to transition to a dialog in the current document.

Syntax


<goto next="URI" expr="ECMAScript_Expression" nextitem="item" expritem="ECMAScript_Expression" fetchaudio="URI" fetchaudiodelay="time_interval" fetchaudiominimum="time_interval" fetchhint="safe" fetchtimeout="time_interval" maxage="integer" maxstale="integer"/>

Attributes

Attribute

Description

next

The URI of the dialog (i.e. form or menu) or document to transition to when this <goto> is executed.  Exactly one of next, expr, nextitem, or expritem must be specified.

expr

An ECMAScript expression to be evaluated and used as the URI of the dialog (i.e. form or menu) or document to transition to when this <goto> is executed.  Exactly one of next, expr, nextitem, or expritem must be specified.

nextitem

The URI of the form item to transition to when this <goto> is executed.  Exactly one of next, expr, nextitem, or expritem must be specified.

expritem

An ECMAScript expression to be evaluated and used as the URI of the form item to transition to when this <goto> is executed.  Exactly one of next, expr, nextitem, or expritem must be specified.

fetchaudio

The URI of audio to play while waiting for the document to be fetched.  Optional.

Overrides the value of the fetchaudio property.

fetchaudiodelay

The length of time to wait at the start of the fetch delay before playing fetchaudio.  Optional.

Overrides the value of the fetchaudiodelay property.

A platform extension.

fetchaudiominimum

The minimum length of time to play fetchaudio, once started, even if the document arrives in the meantime.  Optional.

Overrides the value of the fetchaudiominimum property.

A platform extension.

fetchhint

Defines when the next document should be fetched.  Optional.

  • safe - only load the next document when needed

Overrides the value of the documentfetchhint property.

fetchtimeout

The length of time to wait for the next document to be fetched before throwing an error.badfetch event.  Optional.

Overrides the value of the fetchtimeout property.

maxage

Indicates that this document is willing to use a cached copy of the next document only while the age of the cached copy is less than or equal to the number of seconds specified by this attribute.  Optional.

Overrides the value of the documentmaxage property.

maxstale

Indicates that this document is willing to use a cached copy of the next document that has exceeded its expiration time by as much as the number of seconds specified by this attribute. Optional.

Overrides the value of the documentmaxstale property.

Attribute Notes

Parents

Block Catch Error Filled ForEach Help If Noinput Nomatch

Children

None

VoiceGenie Extensions

Limitations/Restrictions

Example


<?xml version="1.0"?> <vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"> <form> <block> This is the first block. <goto nextitem="block2"/> </block> <block name="block2"> This is the second block. <goto next="#form2"/> </block> </form> <form id="form2"> <block> This is the second form. </block> </form> </vxml>