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

Controlling the size of the dropdown window

Status
Not open for further replies.

shaunk

Programmer
Aug 20, 2001
402
AU
I am using standard Select and Option tags to populate a
dropdown list of players from the database.
I am attempting to increase the size of the dropdown window
containing the players.
At the moment, it populates 10 entries in the list and to get to the 11th , the scroll bar has to be used.
Is there an attribute on the Select tag that can handle this.
Thanks
 

To clarify that, you CAN modify the amount shown - if you choose to enable multiple selection. Other than that, the answer is no ;o)

Dan


The answers you get are only as good as the information you give!

 
I think you can use the size attribute.
Code:
<html><head>
<title> test select </title>
</head>
<body>
<select size = "21">
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
<option>test</option>
</select>
</body
</html>
Is this what you mean?

Glen
 

Wow - I had absolutely no idea that the size attribute worked for non-multiple select boxes. Nice!

Shame you can't specify the size of the drop-down however :eek:(

Dan


The answers you get are only as good as the information you give!

 
Glen,

It's good to know size does count after all !

It does control the size of the window that the options appear in , but as Dan has said, it doesn't control the dropdown window size.
I populate the list inside a do while loop which assigns each option a value according to the number of players in the D/B. So there's only one <option>&value</option> set.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top