Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

duplicating options in pick list

Status
Not open for further replies.

Scobe

MIS
Jan 31, 2003
13
GB
hi, I have got OPTION statements embedded in my asp which work fine.
But when clicking on the pull-down button for the list, it is listing the choices of Yes and No and also the value for this field out of my recordset is displaying in the list. (e.g. Yes).
This means that my pick list is showing Yes,No,Yes.

This is my code:-

Response.write "<td align=left width=55>Drive</td>"
response.write "<td><SELECT NAME=DriveYN SIZE=1 class='inputbody'>"
Response.write "<option selected>" & strDrive & "<OPTION >Yes</OPTION> <OPTION>No</OPTION> </SELECT></td>"

Is there any way of stopping this.

kind regards
Steve
 

<%
optionsarray = Array("yes","no")
for each value in optionarray
if value = strdrive then
chkval = " selected"
else
chkval = ""
end if
%>
<option<%=chkval%>><%=Value%></option>
<%
next
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top