Show pageOld revisionsBacklinksExport to PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== < var > ====== ===== Description ===== The <var> element declares a variable in the scope of its parent element. If the variable is already defined in the current scope, further declaration is treated as value assignments. ===== Syntax ===== <code> <var name="String" expr="ECMAScript_Expression"/> </code> ===== Attributes ===== |name|The name attribute defines the name of the variable. This attribute is required.| |expr|The expr attribute is the initial value of the variable. This attribute is optional and defaults to undefined.| ===== Parents ===== <code> <block>, <catch>, <error>, <filled>, <form>, <help>, <if>, <noinput>, <nomatch>, <vxml> </code> ===== Children ===== <code> None. </code> ===== Extensions ===== <code> None. </code> ===== Limitations/Restrictions ===== <code> None. </code> ===== Example Code ===== <code> <?xml version="1.0"?> <vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"> <var name="world" expr="'world'"/> <form> <field name="hello"> <grammar>hello | goodbye</grammar> <help>Just say hello</prompt> <prompt>Say hello</prompt> <noinput>Say something</noinput> <filled> <prompt>Hello, <value expr="world"/>! </prompt> </filled> </field> </form> </vxml> </code> legacy/vxi_developer_guide/voicexml_references/elements/var.txt Last modified: 2017/07/28 23:53by javier