Hi all,

Looking for a piece of code to limit the number of selections initially viewable in a drop down menu on a html drop down list. At present the menu is trying to display as many options as can be shown on the screen - this is in most cases impractical and I want it to show pffff...10 at most with scroll bar for the rest of them.

Here's the current code:

<form method="POST" action="whatever.asp" target="1">
<p>
<select name="selType" onChange="changeOptions(this,document.getElementsByName('selCounty')[0])">
<option value="">[ Select Country ]</option>
<%
'the only way the RS could be BOF at this point is if it was empty
If Not rsCountry.BOF Then rsCountry.MoveFirst
Dim last_country
Do Until rsCountry.EOF
If rsCountry("devCountry") <> last_country Then
Response.Write "<option>" & rsCountry("devCountry") & "</option>"
last_country = rsCountry("devCountry")
End If
rsCountry.MoveNext
Loop
%>
</select>&nbsp;&nbsp;&nbsp;&nbsp; <select name="selCounty" size="1">
<option value>[ Select County ]</option>
</select>&nbsp;&nbsp;&nbsp; <input type="submit" value="Search">
</p>
</form>

And a screenshot of the current problem:



Cheers