• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 611
  • Last Modified:

Making a select list scroll in IE6

Hi -

This seems to be a fundamental but I cannot make IE6 do what I want.
I have a select list that is 9 options long and when the user clicks on the list all 9 options display.   I'd like to have only 4 options display and then have a scroll bar appear to reach the rest.
How is this done in IE6?

Thnks,
d2
<select name="MaterialType" id="MaterialType" style="width:175px;" >
					
<option>Please Select</option>
<option value="PortlandCementConcrete">Portland Cement Concrete</option>
<option value="PlainConcrete">Plain Concrete</option>
<option value="ReinforcedConcreteRCP">Reinforced Concrete RCP</option>					
<option value="ContinuouslyReinforcedCRCP">Continuously Reinforced CRCP</option>
<option value="PrestressedConcrete">Prestressed Concrete</option>						
<option value="FibrousConcrete">Fibrous Concrete</option>
<option value="AsphaltConcrete">AsphaltConcrete</option>
<option value="RoadMixBituminousSurface">Road Mix BituminousSurface</option>						
<option value="SandAsphalt">Sand Asphalt</option>
</select>

Open in new window

0
dzash2000
Asked:
dzash2000
1 Solution
 
Answering4uAntCommented:
If you add size = 5, this will display your Please Select and 4 options but will appear like that before the user even uses the select list. Will look like more of a select box than a select list
I am personally not sure if you can pre-set how many options you see/dont see.
0
 
blacksixCommented:
I don't believe this is possible, in fact IE7 has rewritten the select element completely because of all the bugs it had.

There are some 3rd party workarounds that may help. YUI has an autocomplete feature that you can use as a select box and control the number of elements it displays with simple css height. Worth a look I think..


http://developer.yahoo.com/yui/examples/autocomplete/ac_combobox.html

0
 
dzash2000Author Commented:
blacksix - I'm glad you said that it couldn't be done with IE6 - now I don't feel like I'm losing my mind.  I will check into your other solution.
d2
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now