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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop Down menus

Status
Not open for further replies.

sthmpsn1

MIS
Sep 26, 2001
456
0
0
US
I am pulling information into a drop down menu from a database. How do I make it so the drop down menu is blank initially. In other words I don't want the dropdown menu to have an initial value.
 
Inserting a blank line is simple, just don't enter information and make that cell selected.
<SELECT>
<OPTION VALUE=&quot;&quot; SELECTED></OPTION>
</SELECT

I assume that you are looping through a recordset to build the rest of the options.
 
Hi

The code for the drop-down should be something like this :

<SELECT>
<OPTION VALUE=&quot;&quot; SELECTED></OPTION>
<%do while not rs.eof%>
<OPTION VALUE=&quot;<%=rs(0)%>&quot; SELECTED><%=rs(0)%></OPTION>
<%rs.movenext
loop%>
</SELECT>

Hope this solves your problem :) *** ASP/VB/SQL Programmer (Free Lancing work accepted) *** B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top