469,362 Members | 2,575 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,362 developers. It's quick & easy.

DropDownList SelectedItem Javascript

Hi;
I can read the selectedvalue of dropdownlist by javascript using
this.value...
How can i get the selectedItem.text by javascript?
Mar 6 '06 #1
3 11762
Alper,

this.options[this.selectedIndex].value

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Alper ÖZGÜR" <al******@gmail.com> wrote in message
news:uy**************@TK2MSFTNGP15.phx.gbl...
Hi;
I can read the selectedvalue of dropdownlist by javascript using
this.value...
How can i get the selectedItem.text by javascript?

Mar 6 '06 #2
It returns the SelectedValue... Not SelectedText.....

"S. Justin Gengo [MCP]" <justin@[no_spam_please]aboutfortunate.com>, haber
iletisinde şunları yazdı:uQ**************@TK2MSFTNGP11.phx.gbl...
Alper,

this.options[this.selectedIndex].value

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Alper ÖZGÜR" <al******@gmail.com> wrote in message
news:uy**************@TK2MSFTNGP15.phx.gbl...
Hi;
I can read the selectedvalue of dropdownlist by javascript using
this.value...
How can i get the selectedItem.text by javascript?


Mar 6 '06 #3
Alper,

Sorry about that. I forgot to switch it from some of my code I copy and
pasted. It's pretty simple really. Just switch value to text.

this.options[this.selectedIndex].text

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Alper ÖZGÜR" <al******@gmail.com> wrote in message
news:ul**************@TK2MSFTNGP10.phx.gbl...
It returns the SelectedValue... Not SelectedText.....

"S. Justin Gengo [MCP]" <justin@[no_spam_please]aboutfortunate.com>, haber
iletisinde şunları yazdı:uQ**************@TK2MSFTNGP11.phx.gbl...
Alper,

this.options[this.selectedIndex].value

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Alper ÖZGÜR" <al******@gmail.com> wrote in message
news:uy**************@TK2MSFTNGP15.phx.gbl...
Hi;
I can read the selectedvalue of dropdownlist by javascript using
this.value...
How can i get the selectedItem.text by javascript?



Mar 6 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Ivan | last post: by
2 posts views Thread by HH | last post: by
2 posts views Thread by jeffmagill | last post: by
2 posts views Thread by =?Utf-8?B?cm9kY2hhcg==?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.