< goto >
Description
The < goto > attribute transitions to another item in the current form, another dialog in the same document, or to a different document. Transitioning to another dialog in the current document or to a different document will cause the old dialog’s variables to be lost. Document variables are retained when transitioning to the same document with an empty URI reference.
Syntax
<goto next="URI" expr="ECMAScript_Expression" nextitem="String" expritem="ECMAScript_Expression" fetchaudio="URI" fetchhint="prefetch" | "safe" fetchtimeout="time_interval" maxage="time_interval" maxstale="time_interval"/>
Attributes
next | The next attribute is the URI in which to transition to. This attribute is required, and one of next, expr, nextitem, expritem is also required. |
expr | The expr attribute is an ECMAScript Expression that yields the URI. This attribute is required, and one of next, expr, nextitem, expritem is also required. |
nextitem | The nextitem attribute is the name of the next form item to visit in the current form. This attribute is required, and one of next, expr, nextitem, expritem is also required. |
expritem | The expritem attribute is the ECMAScript Expression that yields the name of the next form item to visit. This attribute is required, and one of next, expr, nextitem, expritem is also required. |
fetchaudio | The fetchaudio attribute is the URI of audio to play while waiting for the next document to be fetched. |
fetchtimeout | The fetchtimeout attribute is the time interval to wait for an audio file to be fetched before playing the alternate content. This attribute is optional. |
fetchhint | The fetchhint attribute defines when the audio file should be retrieved. This attribute is optional. * prefetch – the audio file may be downloaded when the page is loaded. * safe – only loads the audio file when needed. |
maxage | The maxage attribute indicates the maximum time in seconds that this document will use this file before fetching another copy. This attribute is optional. |
maxstale | The maxstale attribute indicates the maximum time in seconds that this document will use the file that exceeded the maxage time. This attribute is optional. |
Parents
<block>, <catch>, <error>, <filled>, <help>, <if>, <noinput>, <nomatch>
Children
None.
Extensions
None.
Limitations/Restrictions
None.
Example Code
<?xml version="1.0"?> <vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"> <form id="maindish"> <field name="done" type="boolean"> <prompt> Are you done here ? </prompt> <filled> <if cond="done== 'FALSE'"> <goto nextitem="notdone" /> </if> </filled> </field> <field name="whatnext"> <prompt> Would like any desserts or you want me to bring your bill? </prompt> <grammar type="text/x-grammar-choice-dtmf"> 1 {bill} | 2 {desserts} </grammar> <filled> <if cond="whatnext=='bill'"> <goto nextitem="bill" /> <elseif cond="whatnext=='desserts'" /> <goto next="#desserts" /> </if> </filled> </field> <block name="bill"> Please wait. I am getting your bill for you. <disconnect/> </block> <block name="notdone"> Oh, I am sorry. Enjoy. <disconnect/> </block> </form> <form id="desserts"> <field name="choice"> <prompt> <form id="desserts"> <field name="choice"> <prompt> What would you like for your desserts? </prompt> </field> </form> </vxml>