HTML Select, OnChange on <option>?

Discussion in 'Javascript' started by @sh, Apr 26, 2005.

  1. @sh

    @sh Guest

    Hi guys,

    As far as I understand it, there is no possible way to add an
    OnSelect/Onchange to an actual <option> within a select tag (to perhaps jump
    to a page or run a DOM command), is this still correct with modern client
    browser advances (obviously taking into account the incompatibilities of
    this method with older browsers).

    Cheers, Ash
    @sh, Apr 26, 2005
    #1
    1. Advertising

  2. @sh wrote:

    > As far as I understand it, there is no possible way to add an
    > OnSelect/Onchange to an actual <option> within a select tag


    Use the select element's onchange handler and it's selectedIndex
    property instead.

    ciao, dhgm
    Dietmar Meier, Apr 26, 2005
    #2
    1. Advertising

  3. @sh

    @sh Guest

    "Dietmar Meier" <> wrote in
    message news:...
    > @sh wrote:
    >
    >> As far as I understand it, there is no possible way to add an
    >> OnSelect/Onchange to an actual <option> within a select tag

    >
    > Use the select element's onchange handler and it's selectedIndex
    > property instead.
    >
    > ciao, dhgm


    Ahhhh ok cool, shame its not a little simpler though and accessible directly
    from the <option> tag.

    Cheers, Ash
    @sh, Apr 26, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anders S. Clausen
    Replies:
    3
    Views:
    55,324
    ranjithchinnasamy83
    Jan 5, 2009
  2. J. Hall
    Replies:
    2
    Views:
    1,044
    Jeff Thies
    Apr 21, 2004
  3. WebRaster
    Replies:
    1
    Views:
    260
    Francisco Spaeth
    Oct 26, 2005
  4. The Natural Philosopher

    <select..onchange() > with only one <option>

    The Natural Philosopher, Sep 27, 2007, in forum: Javascript
    Replies:
    15
    Views:
    328
    The Natural Philosopher
    Oct 2, 2007
  5. rvelosoo
    Replies:
    1
    Views:
    317
    Bart Van der Donck
    Aug 13, 2008
Loading...

Share This Page