Microsoft
Software
Hardware
Network
Question : getting text from a listbox in javascripts
Hi, I want to get the text rather than the value of a listbox. If I wanted to get the value, I would use this
var dropdown_value=document.ge
tElementBy
Id("my_dro
pdown").va
lue;
however I want to get the text, how could I do this?
Thanks.
Answer : getting text from a listbox in javascripts
var dropDown = document.getElementById("m
y_dropdown
")
var dropdown_value=dropDown.op
tions[drop
Down.selec
tedIndex].
text;
or
var dropdown_value=dropDown.op
tions[drop
Down.selec
tedIndex].
innerHTML;
Random Solutions
Digital signature control not visible
C++ Serial Communication - LSB & MSB
multiple email domains and sender selection
File Upload in AJAX enabled TabContainer
Two GIG Nics in my HP workstation how do I set them up to load balance?
OCS 2007 R2 and Cisco call manager
Terminal server 2008 R2 Pinned Taskbar Links
Move applications between networked computers
Microsoft System Center Ops Manager 2007 - Reporting
Select All Columns Count Column Group By Only One Column?