D
ddailey
I have a select named "s" in a form named "f":
By default only one of the options in the select appears on the page --
that is how I want it.
What I'd like to do is simulate a click on the select so that all of
its options become visible -- i.e., its option box opens to reveal all
document.f.s.options.length options.
I've tried the following:
1. document.f.s.options[k].selected=true
2. document.f.s.focus()
3. document.f.s.click()
4. document.f.s.size=document.f.s.options.length
1. succeeds in changing the option which is visible but leaves the
displayed number unchanged
2. highlights the currently visible option-- indicating focus has been
received
3. appears to do nothing
4. this changes the size of the visible rectangle, and is sort of what
I want, except that the other options appear above the select's prior
rectangle (hence disrupting extant page layout) rather than allowing
the other options to "drop down" below as should happen when physically
clicking on a select.
I might just have to build a widget to do this, but thought someone
might know of the proper method for effecting this behavior.
TIA
ddailey
By default only one of the options in the select appears on the page --
that is how I want it.
What I'd like to do is simulate a click on the select so that all of
its options become visible -- i.e., its option box opens to reveal all
document.f.s.options.length options.
I've tried the following:
1. document.f.s.options[k].selected=true
2. document.f.s.focus()
3. document.f.s.click()
4. document.f.s.size=document.f.s.options.length
1. succeeds in changing the option which is visible but leaves the
displayed number unchanged
2. highlights the currently visible option-- indicating focus has been
received
3. appears to do nothing
4. this changes the size of the visible rectangle, and is sort of what
I want, except that the other options appear above the select's prior
rectangle (hence disrupting extant page layout) rather than allowing
the other options to "drop down" below as should happen when physically
clicking on a select.
I might just have to build a widget to do this, but thought someone
might know of the proper method for effecting this behavior.
TIA
ddailey