| CallXML 3.0 Development Guide | Home | Frameset Home |
|
<on> element.
"If it is raining, then wear a raincoat"
"If it is a Steve Guttenberg movie then change the channel"
"If the keypress is '6' then play 'If6was9.wav'"
"If the keypress was '9' then play '99RedBaloons.wav'"
<prompt choice="6,9">
Press six for Jimi Hendrix, or press nine for euro-hit wonder Nina.
</prompt>
<on event="choice:6">
<playaudio value="If6was9.wav"/>
</on>
<on event="choice:9">
<playaudio value="99Redballoons.wav"/>
</on>
<prompt choice="six,nine">
Press six for Jimi Hendrix, or press nine for euro-hit wonder Nina.
</prompt>
<on event="choice:six">
<playaudio value="If6was9.wav"/>
</on>
<on event="choice:nine">
<playaudio value="99Redballoons.wav"/>
</on>
<on> element we specify the event type, followed by a colon, then include the user input item itself<on> element, we specify application action that should occur when we have trapped a input event.| ANNOTATIONS: EXISTING POSTS |
visionik
|
|
| Note:
While the prompt example as shown will work, it's important to note that prompt is also a container type element. As a result, you can actually put the "on" elements inside your prompt, to group things more logically in your code. Here's an example: <prompt choice="6,9"> Press six for Jimi Hendrix, or press nine for euro-hit wonder Nina. <on event="choice:6"> <playaudio value="If6was9.wav"/> </on> <on event="choice:9"> <playaudio value="99Redballoons.wav"/> </on> </prompt> |
|
rqualis
|
|
| I tried this sample, but it only worked when I used "choices" instead of "choice" as instructed above. | |
saqibsarwar
|
|
| change
<prompt choice="6,9"> to <prompt choices="6,9"> and kindly upload tested code, as it wasted my time in getting it right. thanks |
|
voxeoAlexBring
|
|
| Hello,
Thanks for catching that typo for us. The changes will be reflected in our latest build of the Docs that should go live in the next week or two. Regards, Alex Voxeo Support |
| login |
|