21474

Question:
Is it possible to control the selectbox dropdown size? Actually a property called <strong>SIZE</strong> is already there. But my requirement is, when I click that select box, options are populating, in that list can I control the size..
Answer1:try this. I think this is what you are looking for.
<select name="select1" onmousedown="if(this.options.length>5){this.size=5;}" onchange="this.size=0;" onblur="this.size=0;" style="position: absolute">
<option>a</option>
<option>b</option>
<option>c</option>
<option>d</option>
<option>e</option>
<option>f</option>
<option>g</option>
<option>h</option>
<option>i</option>
<option>j</option>
<option>k</option>
<option>l</option>
</select>
Answer2:using this you will be able to limit the size.
<select name="select" id="select" size="2" >
<option>a</option>
<option>b</option>
<option>c</option>
<option>d</option>
<option>e</option>
</select>