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

Dynamic Select Boxes

Status
Not open for further replies.

mtarby

Programmer
Feb 19, 2003
89
US
I'm guessing this is an easy question, but I can't figure it out. I've got a select box that is populated with fields from a database table:
Code:
<select name="subject">
<%
While (NOT catalog.EOF)
%>
<option value="<%=(catalog.Fields.Item("library_subject_id").Value)%>" ><%=(catalog.Fields.Item("library_topic_grouping").Value)%>&nbsp;-&nbsp; <%=(catalog.Fields.Item("library_category").Value)%></option>
 <%
  catalog.MoveNext()
Wend
If (catalog.CursorType > 0) Then
  catalog.MoveFirst
Else
  catalog.Requery
End If
%>
</select>

It works great, but my question is how do I have a "Choose field" option with a blank value?

Thanks in advance.

Michelle
 
You can just add a static choose field option before you begni your ASP...Just don't put a value in for the link.

somethin like:

Code:
<form name="form1">
  <select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
    <option>Choosefield</option>
  <% 
  'begin your asp
  %>
  </select>
</form>

should work fine
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top