[Javascript] PPK - Dynamically changing list boxes

Ben Curtis Quixote at LaMancha.org
Thu Jun 21 19:12:51 CDT 2001


> PPK, I have followed the example on your web page on how to change list
> boxes dynamically. (new Option()). I have this function working correctly
> but in Netscape 4 the list boxes don't change their width when the value in
> the list box gets wider, thus a lot of the values you can't see properly. Do
> you know why this might be happening?

Inherent in Netscape, and no way to avoid it. The workaround is to
pre-populate the select box to the desired width (and in Windows, to the
desired number of items, too). Like so:

<select name="foo">
  <option>-----------------------------</option>
  <option> </option>
  <option> </option>
  <option> </option>
  <option> </option>
  <option> </option>
  <option> </option>
  <option> </option>
  <option> </option>
  <option> </option>
  <option> </option>
</select>

+Ben Curtis
...leveraging synergy right out of the box.










More information about the Javascript mailing list