Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #14106
| From | "Mel Smith" <med_cutout_syntel@aol.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Accessing a <select> <option> ? |
| Date | 2012-05-22 20:26 -0600 |
| Message-ID | <a2306aFqreU1@mid.individual.net> (permalink) |
| References | <a2273uFft7U1@mid.individual.net> <jpgtps$v0t$1@dont-email.me> <a22dkbF24fU1@mid.individual.net> |
Matt said:
"Mel Smith" <med_cutout_syntel@aol.com> wrote in message
news:a22dkbF24fU1@mid.individual.net...
> Matt said:
> [snip]
>
>> Yes; you are correct in noting that the `click` event does
>> not work well with option elements. Perhaps, as has been
>> suggested in various threads before, you could add a `blur`
>> and/or `focus` event handler to the select element and track
>> "changes" that way. The first selected option (presence of
>> the `multiple` boolean attribute was not specified) can be
>> retrieved via the `selectedIndex`[1] property of the
>> `HTMLSelectElement`interface.
>>
Matt:
I've included the <select> element and the selectedIndex into my page,
and now things work great !
Thank you.
-Mel Smith
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Accessing a <select> <option> ? "Mel Smith" <med_cutout_syntel@aol.com> - 2012-05-22 13:18 -0600
Re: Accessing a <select> <option> ? "Mel Smith" <med_cutout_syntel@aol.com> - 2012-05-22 13:43 -0600
Re: Accessing a <select> <option> ? Matt McDonald <matt@fortybelow.ca> - 2012-05-22 14:43 -0600
Re: Accessing a <select> <option> ? "Mel Smith" <med_cutout_syntel@aol.com> - 2012-05-22 15:09 -0600
Re: Accessing a <select> <option> ? "Mel Smith" <med_cutout_syntel@aol.com> - 2012-05-22 20:26 -0600
Re: Accessing a <select> <option> ? SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-05-23 21:17 +0200
Re: Accessing a <select> <option> ? "Mel Smith" <med_cutout_syntel@aol.com> - 2012-05-23 13:42 -0600
Re: Accessing a <select> <option> ? "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-05-23 21:17 +0000
csiph-web