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
Create linked server from MS Sql to oracle server
Excel Convert Text to Number
Mac RDP clients slow?
Hyper v full Installation remote administration issues
troubleshooting easy vpn remote
Extremely slow access to Redirected Folders in SBS2008 with XP Pro clients
Removing rollOver and rollOut handlers on movieclips
VBA to rename an MS Word dropdown formfield.
Top view (2D) Battleship following the mouse cursor (with bearing and limited turning speed)
Can't get Thumbnails to Work Outside of the Domain