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
Best way to handle vanity urls in IIS?
Blackberry browser 400 error - socketexception Connection reset
Audit, log and RBAC on AIX
Application pool suffered a fatal communication error with WWW PS
How do I verify Using SSIS if an XML file exist in the folder , change it's name and move ot to an SFTP if exist
How to get a Dell D800 to load Bios fully?
NTLDR is Missing on HP Proliant ML350 G4 with Windows 2003 SP2
How to avoid zero(s) in front of number(s) disappears in array
AP running G and N
V2P (Windows 2008)