Try this:

Lester Ward <[EMAIL PROTECTED]> wrote on 13/12/2002 04:10:19 AM:

> I feel really dumb for asking this, but I'm going insane. I'm looking to 
use
> the ask tag in a script and then do different things depending on the
> answer. My code is similar to this:
> 
> <i:ask question="Which thing are you using: This, Other? (t,o) "/>
> <log:warn>User typed: '${interact.answer}'</log:warn>

<j:set var="answer">${interact.answer}</j:set>

> <j:choose>
>   <j:when test="${interact.answer.equalsIgnoreCase('t')}">

<j:when test="${answer.equalsIgnoreCase('t')}">

>     <echo message="Using This"/>
>   </j:when>
>   <j:when test="${interact.answer == 'o'}">

<j:when test="${answer.equalsIgnoreCase('o')}">

>     <echo message="Using Other"/>
>   </j:when>
>   <j:otherwise>
>     <echo message="None chosen"/>
>   </j:otherwise>
> </j:choose>
> 
> I'm sure the solution to this is quite trivial, so sorry for polluting 
the
> list with it. Any help would be appriciated, however. Also, if anyone 
can
> point me to decent sample scripts, or otherwise point me to somewhere 
where
> I could have found this information without posting here, I'd appriciate
> that as well. 

Does the above work?
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au

Reply via email to