Results 1 to 4 of 4

Thread: Resetting radio buttons with a check box

  1. #1
    Join Date
    Apr 2006
    Posts
    30
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Resetting radio buttons with a check box

    I have three radio buttons, and they are all set to unchecked. If the user selects one, is there a way of resetting them back to unselected?

    Here is the breakdown.

    1. 3 radioBTNs are unselected
    2. user clicks on one and selects it
    3. the user then selects a CHECKBOX in the same form while will then reset ALL 3 radioBTNs

    Is it possible?

    THANKS

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by dude9er
    I have three radio buttons, and they are all set to unchecked.
    One should always be selected by default.

    If the user selects one, is there a way of resetting them back to unselected?
    Yes, but why would you want to do that. What purpose does it serve?

    Mike

  3. #3
    Join Date
    Apr 2006
    Posts
    30
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    i am using div tags to reveal and hide certain elements of a form depending on what the user chooses. if they change there mind on one section of the form then it would reset the radio buttons so that i am not receiving input from those fields.

  4. #4
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by dude9er
    i am using div tags to reveal and hide certain elements of a form depending on what the user chooses. if they change there mind on one section of the form then it would reset the radio buttons so that i am not receiving input from those fields.
    Then consider checking those values server-side only if the received state of the checkbox suggests that you should.

    This sort of thing should be based around logic, not trickery. For a start, it's useless when client-side scripting is disabled (or someone decides to be naughty and bypasses those checks).

    Mike

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
  •