JonathanG6SWJ
Programmer
On an asp page that allows the user to edit account details I have a list box showing relationships.
I need to set the selected option to that retrieved from a DB record when I create / present the edit page to the user.
No matter what I try I always seem to select the last item in the list - any clues.
Regards
Jonathan
I need to set the selected option to that retrieved from a DB record when I create / present the edit page to the user.
No matter what I try I always seem to select the last item in the list - any clues.
Code:
<%
j0="False"
j1="True"
j2="False"
j3="False"
%>
<select name="Relationship" id="mySelect" >
<option value="0" selected="<%=j0%>"></option>
<option value="1" selected="<%=j1%>">Me</option>
<option value="2" selected="<%=j2%>">Boss</option>
<option value="3" selected="<%=j3%>">Team</option>
</select>
Jonathan