Proceed to WirelessDevNet Home Page
Publications, e-books, and more! Community Tutorials Store Downloads, tools, & Freebies! IT Career Center News Home
newnav.gif

Newsletters
EMail Address:



   Content
  - Articles
  - Columns
  - Training
  - Library
  - Glossary
 
   Career Center
  - Career Center Home
  - View Jobs
  - Post A Job
  - Resumes/CVs
  - Resource Center
 
   Marketplace
  - Marketplace Home
  - Software Products
  - Wireless Market Data
  - Technical Books
 
   News
  - Daily News
  - Submit News
  - Events Calendar
  - Unsubscribe
  - Delivery Options
 
   Community
  - Discussion Boards
  - Mailing List
  - Mailing List Archives
 
   About Us
  - About WirelessDevNet
  - Wireless Source Disks
  - Partners
  - About MindSites Group
  - Advertising Information
 
Voice XML Reference Voice XML Reference

Bookmark this page

The subdialog Element - <subdialog>

Description:
A <subdialog> element invokes a “called” dialog (known as the subdialog) identified by its src attribute. The subdialog executes in a new execution context. The subdialog proceeds until the execution of a <return> element which causes the subdialog to return. When the subdialog returns, its execution context is deleted, and execution resumes in the calling dialog with any appropriate <filled> elements. An execution context includes all declarations and state information for the dialog, the dialog’s document, and the application root (if present). Subdialogs can permit the reuse of a common dialog such as this example of prompting a user for credit card information, or build libraries of reusable applications.


Example:
<!-- form dialog that calls a subdialog -->
<form>
  <subdialog name="result" src="#getdriverslicense">
    <param name="birthday" expr="'2000-02-10'"/>
    <filled>
      <submit next="http://myservice.example/cgi-bin/process"/>
    </filled>
  </subdialog>
</form>
<!-- subdialog to get drivers license -->
<form id="getdriverslicense">
  <var name="birthday"/>
  <field name="drivelicense">
    <grammar src="http://grammarlib/drivegrammar.gram" type="application/x-jsgf"/>
    <prompt> Please say your driver's license. </prompt>
    <filled>
      <if cond="validdrivelicense(drivelicense,birthday)">
        <var name="status" expr="true"/>
      <else/>
        <var name="status" expr="false"/>
      </if>
      <return namelist="drivelicense status"/>
    </filled>
  </field>
</form>


Attributes
Name Value Description
name PCDATA The result returned from the subdialog, an ECMAScript object whose properties are the ones defined in the namelist attribute of the <return> element.
expr PCDATA The initial value of the form item variable; default is ECMAScript undefined. If initialized to a value, then the form item will not be visited unless the form item variable is cleared.
cond boolean A boolean condition that must also evaluate to true in order for the form item to be visited.
modal boolean Controls which grammars are active during the subdialog. If true (the default) all grammars active in the calling dialog are disabled. If false, they remain active.
namelist PCDATA Same as namelist in <submit>, except that the default is to submit nothing. Only valid when fetching another document.
src URI The URI of the <subdialog>
method (post|get) Specifies the HTTP submission method.
enctype ContentType Specifies the content type to be used to submit the parameter to the server when the method is "post". The default value for this attribute is "application/x-www-form-urlencoded".
caching 'safe' or 'fast' Eithere safe to force a query to fetch the most recent copy of the content, or fast to use the cached copy of the content if it has not expired. If not specified, a value derived from the innermost caching property is used.
fetchaudio URI The URI of the audio clip to play while the fetch is being done. If not specified, the fetchaudio property is used, and if that property is not set, no audio is played during the fetch.
fetchint "prefetch", "safe", "stream" Defines when the interpreter context should retreive content from the server. prefetch indicates a file may be downloaded when the page is loaded, whereas safe indicates a file that should only be downloaded when actually needed. In the case of a very large file (implying long download times) or a streaming audio source, stream indicates to the interpreter context to begin processing the content as it arrives and should not wait for full retrieval of the content. If not specified, a value derived from the innermost relevant *fetchint property is used.
fetchtimeout integer The interval to wait for the content to be returned before throwing an error.badfetch event. If not specified, a value derived from the innermost fetchtimeout is used.


Back to Tag Listing
Sponsors

Search

Eliminate irrelevant hits with our industry-specific search engine!









Wireless Developer Network - A MindSites Group Trade Community
Copyright© 2000-2010 MindSites Group / Privacy Policy
Send Comments to:
feedback@wirelessdevnet.com