CallXML 3.0 Development GuideHome  |  Frameset Home

  tutorial Hello World with Choices  |  TOC  |  tutorial Document Navigation  

Introduction to Document Navigation

Now that we have mastered the concept of DTMF input and handling, it's time to take a peek at how we can write an application that a caller can actually navigate through. In HTML, when we want to have the option of allowing a user to go to a point in the document, we can create an anchor and use this as the target of our href, as evidenced below:


<html>
<body>
<p>Lets go <a href="#Here"> Here! </a>
..
..
..
<a name="Here"> You are now Here!</a>
</body>
</html>


When we are dealing with the telephone as a browser, the syntax is slightly different, but the modus operendi is pretty much the same. Instead of using the <a href>, we will instead use the <goto> element. In order to make this work however, we need to have a labeled container element, such as a <block> or <menu>, as our target.  For those familiar with VoiceXML, this will seem pretty familiar. For those who aren't, just keep your eyes glued to the page, and we will enlighten, and edify you. Our CallXML equivalent of the above sample would look something like this:


<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="3.0">
  <block label="Here">
    <say> Lets go to there</say>
    <goto value="#There"/>
  </block>

  <block label="There">
    <say> Whoopee, we are now Here. Sorry, I mean There.</say>
  </block>
</callxml>


Again this is pretty cut and dried. We use the <block label> name as our anchor, and transition the caller as he enters a given block, or, (gasp!), presses a DTMF key, or gives a voice command. Do be aware that nesting content within a container element is not absolutely required....unless of course you want to be able to effectively navigate from one point to another in your app, (and most people seem to want this, go figure). Well shucks, this stuff isn't hard at all. Let's show off a bit, and work the next Lesson with a blatant disregard for safety....



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

login
  tutorial Hello World with Choices  |  TOC  |  tutorial Document Navigation  

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