Forum Moderators: open

Message Too Old, No Replies

Insert "Please Select" within select box

         

Andrew Thomas

8:11 pm on Mar 15, 2004 (gmt 0)

10+ Year Member



This should be simple (but i keep getting errors!), I am getting the list from a database and i need the fist line to say "Please Select" within the drop down list, the code is below

thanks

<select name="LINK_CAT" class="inputFieldIE" id="select" style="width:200" language=javascript onChange="fncsubmit()">
<%
While (NOT rsCat2.EOF)
%>
<option value="<%=(rsCat2.Fields.Item("CAT_ID").Value)%>"><%=(rsCat2.Fields.Item("CAT_NAME").Value)%></option>
<%

</select>

mattglet

8:18 pm on Mar 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<select name="LINK_CAT" class="inputFieldIE" id="select" style="width:200" language=javascript onChange="fncsubmit()">
<option value = "">Please select a value below</option>
<%
While (NOT rsCat2.EOF)
%>
<option value="<%=(rsCat2.Fields.Item("CAT_ID").Value)%>"><%=(rsCat2.Fields.Item("CAT_NAME").Value)%></option>
<%

</select>

Notice the new option before the while loop.

-Matt