hi all,

I have done one work in using multiple select box in which i am fetching value of select boxes from database. This all work i have done using ajax. Like when we select country form first select box then it will show state comes under country. But now problem is that when i am selecting country form first select box then 2nd select box which is for state. This is dyanmically changes size . Sometimes it becomes large and sometime it is very short in size. Because value are changing dynamically . So i want now that size should be fixed of 2nd select box.

IS there any way in html code in which we can fix the size of 2nd select box or we can fix the larges size which it can be ?? how i can set this fix size?????

Please help me to solve this issue.

9 Years
Discussion Span
Last Post by almostbob

Try to apply this with your select element:

<select id="sel" name="sel" style="min-width: 300px; max-width: 300px; width : 300px;" size="1">

you can do the same thing with height.


set before you populate the select box put a value in it equal to the largest expected size, in the code below function populate is not defined, I figure you have yours already written, and my javascript isnt good enough

<select id='country' onchange='populate("nextselect");'>
<option> Select </option>
<option value='appleland'>appleland</option>
<option value='bananaland'>bananaland</option>
<option value='carrotland'>carrotland</option>
<select id='nextselect'>
<option value=""> --------------- </option></select>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.