<return>
Terminates the execution of a subdialog and returns to the main dialog. This element will throw an error.semantic if encountered outside the context of a subdialog call.
Attributes
This section describes the attributes you can set for this element.
|
Name |
Data type |
Default |
|---|---|---|
|
NMTOKEN |
optional |
|
|
CDATA |
optional |
|
|
CDATA |
optional |
|
|
CDATA |
optional |
|
|
CDATA |
optional |
event
The event attribute specifies an event to be thrown within the calling subdialog.
eventexpr
The eventexpr attribute specifies an ECMAScript expression that resolves to the name of the event to be thrown.
message
The message attribute specifies a message describing the event being thrown. This message is available in the <catch> element where the event is caught as _message.
messageexpr
The messageexpr attribute specifies an ECMAScript expression that resolves to the message describing the event being thrown.
namelist
The namelist attribute specifies the name of the variables that are returned to the main dialog. By default, the namelist attribute does not return any variables.
Children
None.
Parents
Sample code
<!-- Is the test complete? -->
<if cond="++iCounter == iterations">
<var name="ratio" expr="iCorrectCount / iterations"/>
<if cond="ratio < min_pass_ratio">
<!--The 'fail' event will be thrown in the calling dialog
along with message, indicating the final ratio.-->
<return event="fail" messageexpr="ratio"/>
<else/>
<return/>
</if>
<else/>
<clear namelist="single_digit_test grader"/>
</if>