[thelist] Auto-Selecting Multiple Select with ASP 2.0?
Rob Smith
rob.smith at THERMON.com
Thu Oct 23 12:16:25 CDT 2003
Hi list,
here's my data in question:
(MyProject.fields.item("Members").value) has this as a string:
DMC\jdoe, DMC\janedoe, DMC\barney
here's my loop to auto select those accounts with a multiple select
statement:
<select name="members" size="5" multiple>
<%
members = split(MyProject.fields.item("Members").value,",")
count_members = uBound(members)
while not People.eof
response.write("<option value=""" &
People.fields.item("userName").value & """")
for x = 0 to count_members
if People.fields.item("userName").value = members(x) then
response.write (" Selected")
end if
next
response.write(">" & People.fields.item("FirstName").value & " " &
People.fields.item("LastName").value & "</option>")
People.movenext
wend
%>
</select>
This works great, but only selects the first name in the series. It
completely ignores: DMC\janedoe, DMC\barney.
Anyone have any idea as to why?
Rob.Smith
More information about the thelist
mailing list