I've implemented this on mouseover and onmouseout like so:
<select size="3" onmouseover="this.size=this.options.length;">
This is all well and good, except i don't want it only on mouseover, i want it always :) forever.
Thanks in advance.
I've implemented this on mouseover and onmouseout like so:
<select size="3" onmouseover="this.size=this.options.length;">
This is all well and good, except i don't want it only on mouseover, i want it always :) forever.
Thanks in advance.
<select size="3" onmouseover="this.size=this.length;">
<option>hello world 1</option>
<option>hello world 2</option>
<option>hello world 3</option>
<option>hello world 4</option>
<option>hello world 5</option>
<option>hello world 6</option>
<option>hello world 7</option>
<option>hello world 8</option>
</select>
this worked for me :)
Update it on DomReady.
window.onDomReady = function() {
var a = document.getElementById('yourId');
a.size = a.length;
}