CallXML 2.0 Development Guide Home  |  Frameset Home

  tutorial Document Navigation  |  TOC  |  tutorial External Document Navigation  
This documentation is for CallXML 2, which has been superceded by CallXML 3. The CallXML 2 language is not being updated any longer. CallXML 3, however, has many new features and is actively being enhanced. If you're writing a new CallXML application, you should use CallXML 3. Click here for the CallXML 3.0 documentation.

External Document Navigation

We have covered how we can navigate within a single document based on user interaction with the application, but we haven't yet covered how we can transition to an entirely separate document. The time, Ladies and Gentlemen, has come. If we don't know how to go to another document, then we will be stuck writing really big applications within a single document framework, and that just plain sucks from a modular standpoint. We want to write small bits of code in a single document if we can, so that different portions of the code can be easily replaced or debugged. Let's wax modular right now, and cover the base concepts.

We have learned that the <goto> element is our primary choice for redirecting callers within a document:

    <goto value="#MyNextBlock"/>

The very same element is used for inter-document navigation as well. Note that we may enter a partial URL...

    <goto value="MyNextPage.xml"/>

......or a full URL:

    <goto value="http://Myserver.com/MyDir/MyNextPage.xml"/>


However, we can take this a step further, and send callers to a specific <block> within a particular document by specifying a block label name after the document filename, provided that we add the '#' delimiter:

    <goto value="MyNextPage.xml#MyNextBlock"/>


Pretty simple, no? We can also use the <goto> element to send variables from one page to another by using the 'submit' attribute:

    <block label="Start">
      <assign var="MyVar" value="'zappa'"/>
        <goto value="MyNextPage.xml#MyNextBlock" submit="MyVar"/>
    </block>


By using this attribute, when the caller reaches <block label="MyNextblock"> in 'MyNextpage.xml', the variable value for 'MyVar' will still be available:

    <block label="MyNextBlock">
        <text> the variables value is $MyVar;</text>
    </block>



We don't need to be rocket scientists to understand the implications of this element, so let's skip any further sardonic explanations, and jump right into the next Lesson. You know you want to.





  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login
  tutorial Document Navigation  |  TOC  |  tutorial External Document Navigation  

© 2011 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site