Hello all. I'm at a bit of a roadblock that I'm likely just thinking
too hard about. Below is some code from my site. Basically I query a
database to populate a select box. I check that values against another
value in the database and if there is a match it writes the option as
"selected." :
<select name="vCat">
<% WHILE NOT rsPTM.EOF 'get all the values for the select box
IF rsPTM("ptmNo") = rsv("vCat") THEN %> 'check for a match
<option selected value="<%=rsPTM("ptmNo")%>"><%=rsPTM("ptmName")%></
option>
<% ELSE %>
<option value="<%=rsPTM("ptmNo")%>"><%=rsPTM("ptmName")%></option>
<% END IF
rsPTM.MoveNext
WEND %>
</select>
And now the problem. I need to actually check the value against an
array of values. I get my array just fine and then try to loop through
it to check the values, but I'm only getting it partially right. In a
multiple select box (not shown) it either selects only one value (even
though more should match) or it writes each value as many times as
there are items in my array. Any thoughts? Thanks all.