select option element onclick?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christopher Benson-Manica

    #1

    select option element onclick?

    Apparently you can't use the onclick event handler for specific
    options in a select element in IE - is that correct? If so, is there
    a way to get the same functionality out of it? What I want to do is
    have a select box where you can select multiple elements without
    holding down the control key; when you click on an option, you toggle
    its selected property. How can I do that?

    --
    Christopher Benson-Manica | I *should* know what I'm talking about - if I
    ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
  • Matt Kruse

    #2
    Re: select option element onclick?

    "Christophe r Benson-Manica" <ataru@nospam.c yberspace.org> wrote:[color=blue]
    > What I want to do is
    > have a select box where you can select multiple elements without
    > holding down the control key; when you click on an option, you toggle
    > its selected property. How can I do that?[/color]

    This can be done by storing the selected options, and re-selecting each time
    the user clicks.
    For an example, see:


    --
    Matt Kruse
    Javascript Toolbox: http://www.mattkruse.com/javascript/


    Comment

    Working...