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
WCF Problem: The private key is not present in the X.509 certificate.
Changing fileserver password
cannot reset Fortinet fortiWIFI 80C to factory settings
Mass user Migrate from LCS to OCS 2007
Routing and remote access VPN ip.
Windows Server 2008 R2 iSCSI Initiator and HP D2D CHAP issue
Store file in mysql using connector.net and blob field
Video Chat Capabilities
Shell command doesn't work on all computers
Infopath Form service comparison between SharePoint 2007 and SharePoint 2010