Limit displayed length of dynamic dropdown list

Is there a way to control how many lines display in a dynamically built dropdown list. For example, a list of states and the dropdown should include all states but only display 1 or 2 lines and allow scrolling thru the list?  Thanks...
rguzikAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
steelseth12Connect With a Mentor Commented:
<select size="4">
<option>1</option>
<option>21</option>
<option>3</option>
<option>4</option>
</select>

set size to howmany lines you want to show
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
use the SIZE property of the SELECT list

<SELECT .... SIZE=2 ...>... </SELECT>
0
 
steelseth12Commented:
i must type slow afterall sorry angelIII.
0
[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

 
rguzikAuthor Commented:
I tried that before posting... it doesn't work...  
When the list "drops down" it occupies 65 lines :-(
0
 
Cornelia YoderArtistCommented:
It should work, please show your code.
0
 
Cornelia YoderConnect With a Mentor ArtistCommented:
Wait, do you want to show 4 lines at the start, or have only 4 of the 65 lines show WHEN the dropdown button is pressed?

If the latter, the number of items displayed in the opened dropdown is a feature of the browser and/or operating system. It will vary from user to user and is out of your control.
0
 
rguzikAuthor Commented:
Thanks steelseth12 and yodercm. I was just being to stingy... it works with size="2" but not size="1". I can live with that :-)
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>it works with size="2"
hmmm. didn't I post that also? :-)
Glad we could help
0
 
rguzikAuthor Commented:
Sorry angelIII... you are so right! If I can find the way to do so I will award points to you as well :-)   Thanks...
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>If I can find the way to do so I will award points to you as well
no problem, does not hurt me.
simply look better next time(s) :-)
0
 
Cornelia YoderArtistCommented:
rquzik, you can email the EE admin and ask them to adjust the points.  Explain and they'll fix it for you.  AngelIII does deserve some of the points.
0
All Courses

From novice to tech pro — start learning today.