javascript radio button turn on/off

Discussion in 'JavaScript' started by selfAfflicted, Apr 7, 2008.

  1. #1
    I was wondering if there is a script that can uncheck a radio button when you double click on that radio button.

    Thanks for any help, this goes through an xml parser, so it has to be structured correctly.
     
    selfAfflicted, Apr 7, 2008 IP
  2. selfAfflicted

    selfAfflicted Peon

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    so is there no way to click on a selected radio button to have it deselect that radio button without having to select another radio button in its group?
     
    selfAfflicted, Apr 10, 2008 IP
  3. temp2

    temp2 Well-Known Member

    Messages:
    1,231
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    150
    Digital Goods:
    2
    #3
    temp2, Apr 11, 2008 IP
  4. selfAfflicted

    selfAfflicted Peon

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    yea, that doesn't help.
     
    selfAfflicted, Apr 23, 2008 IP
  5. xrvel

    xrvel Notable Member

    Messages:
    918
    Likes Received:
    30
    Best Answers:
    2
    Trophy Points:
    225
    #5
    I'm not sure if this is what you meant

    
    <input type="radio" name="a" ondblclick="this.checked = false" /> Click
    
    PHP:
     
    xrvel, Apr 24, 2008 IP
  6. selfAfflicted

    selfAfflicted Peon

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    That is perfect, thanks for your help!
    +1
     
    selfAfflicted, Apr 24, 2008 IP