SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru puco's Avatar
    Join Date
    Feb 2005
    Location
    Slovakia
    Posts
    785
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    radio button change event

    Hey,

    I need to fire an event whenever a radio button selection is changed. onClick works fine on all browsers when the user actually clicks the radio button or corresponding label, but I have a problem when user change the vaules using keyboard (arrow keys, tab, etc.). Then onClick fires in IE, FF but not in Opera.

    Is there an event I could use?

    Thanks
    Martin Pernecky

  2. #2
    SitePoint Guru puco's Avatar
    Join Date
    Feb 2005
    Location
    Slovakia
    Posts
    785
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now I found out onFocus seems to work.
    Martin Pernecky

  3. #3
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd use onkeyup and check to make sure that the checked property was changed.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •