R
Rithish
Is there a way to obtain the height of a <SELECT> element dynamically,
i.e. through javascript?
I want to dynamically display a list box onFocus of a text box
element. Also, if the list box would move out of the bottom screen
area, I would want to move it up by that fraction so that it displays
at the bottom of the screen. To do this, I would need to acquire the
height of the SELECT element. I tried quite a few methods.
elem.offsetHeight // gives 0.
elem.style.height // gives nothing.
elem.style.pixelHeight // gives 0.
elem.style.posHeight // gives 0.
I also tried elem.clientHeight, which provides a value, but only after
the list is displayed atleast once ( the text box is focussed at least
once )
Our working environment is restricted to IE 5+, and a solution that is
constrained to that will also do. ( i.e. ) if there is any.
Any help/advice would be greatly appreciated.
Regards,
Rithish.
i.e. through javascript?
I want to dynamically display a list box onFocus of a text box
element. Also, if the list box would move out of the bottom screen
area, I would want to move it up by that fraction so that it displays
at the bottom of the screen. To do this, I would need to acquire the
height of the SELECT element. I tried quite a few methods.
elem.offsetHeight // gives 0.
elem.style.height // gives nothing.
elem.style.pixelHeight // gives 0.
elem.style.posHeight // gives 0.
I also tried elem.clientHeight, which provides a value, but only after
the list is displayed atleast once ( the text box is focussed at least
once )
Our working environment is restricted to IE 5+, and a solution that is
constrained to that will also do. ( i.e. ) if there is any.
Any help/advice would be greatly appreciated.
Regards,
Rithish.