Plum DEV Documentation
voicexml:tags:block

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

voicexml:tags:block [2014/05/29 15:22]
jennifer meta description
voicexml:tags:block [2019/09/17 12:29]
Line 1: Line 1:
-{{description>​‹block› VoiceXML tag details, attributes and VXML code example | The block element is a form item containing executable content.}} 
-===== <​block>​ ===== 
  
-This element is a form item. It contains executable content that is executed if the block'​s form item variable is undefined and the block'​s cond attribute, if any, evaluates to true. 
- 
-==== Attributes ==== 
- 
-| name | The name of the form item variable used to track whether this block is eligible to be executed; defaults to an inaccessible internal variable. | 
-| cond | An expression that must evaluate to true after conversion to Boolean in order for the form item to be visited. | 
-| expr | The initial value of the form item variable; default is ECMAScript undefined. If initialized to a value, then the block will not be visited unless the form item variable is cleared. | 
- 
-==== Notes ==== 
- 
-None 
- 
-==== Example ==== 
- 
-<​code>​ 
-<?xml version="​1.0"?>​ 
-<vxml version="​2.0">​ 
-  <​form>​ 
-    <!-- This block will be executed first. --> 
-    <​block>​ 
-      <​prompt>​ 
-        Setting block condition variables. 
-      </​prompt>​ 
-      <assign name="​blockcond1"​ expr="​true"/>​ 
-      <assign name="​blockcond2"​ expr="​false"/>​ 
-    </​block>​ 
-    <!-- This block will be executed because "​blockcond1"​ is "​true"​. --> 
-    <block name="​myblock1"​ cond="​blockcond1">​ 
-      <​prompt>​ 
-        This prompt will play. 
-      </​prompt>​ 
-    </​block>​ 
-    <!-- This block will not be executed since "​blockcond2"​ is "​false"​. --> 
-    <block name="​myblock2"​ cond="​blockcond2">​ 
-      <​prompt>​ 
-        This prompt will not play. 
-      </​prompt>​ 
-    </​block>​ 
-  </​form>​ 
-</​vxml>​ 
-</​code>​ 
- 
-The output of the above script would be: 
- 
-Computer: Setting block condition variables. \\ 
-Computer: This prompt will play. 
- 
-==== Child Tags ==== 
- 
-[[voicexml:​tags:​audio|<​audio>​]],​ [[voicexml:​tags:​assign|<​assign>​]],​ [[voicexml:​tags:​clear|<​clear>​]],​ [[voicexml:​tags:​data|<​data>​]],​ [[voicexml:​tags:​disconnect|<​disconnect>​]],​ [[voicexml:​tags:​enumerate|<​enumerate>​]],​ [[voicexml:​tags:​exit|<​exit>​]],​ [[voicexml:​tags:​foreach|<​foreach>​]],​ [[voicexml:​tags:​goto|<​goto>​]],​ [[voicexml:​tags:​if|<​if>​]],​ [[voicexml:​tags:​log|<​log>​]],​ [[voicexml:​tags:​prompt|<​prompt>​]],​ [[voicexml:​tags:​reprompt|<​reprompt>​]],​ [[voicexml:​tags:​return|<​return>​]],​ [[voicexml:​tags:​script|<​script>​]],​ [[voicexml:​tags:​submit|<​submit>​]],​ [[voicexml:​tags:​throw|<​throw>​]],​ [[voicexml:​tags:​value|<​value>​]],​ [[voicexml:​tags:​var|<​var>​]] 
- 
-==== Parent Tags ==== 
- 
-[[voicexml:​tags:​form|<​form>​]]