Hi,
is it possible to expand a Select element via Javascript? (e.g. show the Option elements contained within it)
I've tried theSelect.focus(); but that's not it...
Any help would be appreciated![]()
| SitePoint Sponsor |




Hi,
is it possible to expand a Select element via Javascript? (e.g. show the Option elements contained within it)
I've tried theSelect.focus(); but that's not it...
Any help would be appreciated![]()
Unfortunately, the answer is "no".
We miss you, Dan Schulz.
Learn CSS. | X/HTML Validator | CSS validator
Dynamic Site Solutions
Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.




That sure is unfortunately... thank you for your answer
I'll script some overly complicated "replace-list-of-options-with-div-element"-widget then![]()
Check out these:
<select> Something New, Part 2
<select> Something New, Part 1
We miss you, Dan Schulz.
Learn CSS. | X/HTML Validator | CSS validator
Dynamic Site Solutions
Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.





Cheating:
var sel = document.getElementById("mySelect");
sel.size = sel.options.length;
You're welcome
What does a select-multiple have to do with the size property?
We miss you, Dan Schulz.
Learn CSS. | X/HTML Validator | CSS validator
Dynamic Site Solutions
Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.
Yes, that's the point, it allows the options to be seen. You have to change the multiple attribute/property to be able to select more than one though.
We miss you, Dan Schulz.
Learn CSS. | X/HTML Validator | CSS validator
Dynamic Site Solutions
Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.
Bookmarks