Title: Re: Witango-Talk: Is this possible?
This worked great.

Thanks.

Mark


On 3/1/05 7:51 PM, "David Shelley" <[EMAIL PROTECTED]> wrote:

Mark,
 
Here’s a snippet that might help:
 
<@assign request$itemList <@tokenize value="item1,item2,item5" chars=",">>
<select name=item size=6 multiple>
<option value="item1" <@if expr="@@request$itemList contains item1" true="selected">>item1</option>
<option value="item2" <@if expr="@@request$itemList contains item2" true="selected">>item2</option>
<option value="item3" <@if expr="@@request$itemList contains item3" true="selected">>item3</option>
<option value="item4" <@if expr="@@request$itemList contains item4" true="selected">>item4</option>
<option value="item5" <@if expr="@@request$itemList contains item5" true="selected">>item5</option>
<option value="item6" <@if expr="@@request$itemList contains item6" true="selected">>item6</option>
</select>
 
Dave Shelley
 
-----Original Message-----
From: Mark Weiss [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 01, 2005 7:29 PM
To: [email protected]
Subject: Witango-Talk: Is this possible?

Is this possible?

I have a multiple Select list

<select Name="ssss" size="6" multiple>
<@rows>
<option value-""  HERE  >alskjsdlfj</option>
</@rows>
</select>

I select three items out of 6 in the list and save it to the db like

item1,item2,Item3

Then when I bring it back to display in detail

As it loops through each row returned, I want to check to see if the option value = any of the values (item1, item2, item3) and if so, add "Selected" to the option item so that the 3 items show up as selected in detail.

I know the <@if expr=""></@if> format for multiple "OR" options in the expr statement, but I can seem to get the format done right from the column being returned.

Does anyone have some sample code that might get me further down the road?

I can convert the returned data using <@tokenize> and make an array, but that is as far as I get.

Thanks so much in advance.

Mark

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to