Uncheck radio button

Rate It (1)

Last post 01-07-2009 2:44 AM by SyntaxC4. 1 replies.

Sort Posts:

  • Uncheck radio button

    01-06-2009, 11:58 PM
    • Member
      62 point Member
    • IAmMadan
    • Member since 01-06-2009, 11:36 AM
    • Posts 57

     Hi... I have radio button group and a button in grid view. I have to uncheck corresponding radio button on the click of button through Java script.

  • Re: Uncheck radio button

    01-07-2009, 2:44 AM
    Answer
    • Contributor
      4,209 point Contributor
    • SyntaxC4
    • Member since 07-13-2007, 10:25 AM
    • Guelph, Ontario
    • Posts 690

    Hi IAmMadan,

    Try this:

     

    function uncheckRadio() {
     var choice = document.getElementById('<%= RadioButtonList1.ClientID %>');
     for (i = 0; i < choice.length; i++) {
      if ( choice[i].checked = true ) 
       choice[i].checked = false; 
     }
    }
    

     

    Hope this helps.

    *** REMINDER ***
    If you find this post useful, Please click the 'Mark as Answer' Button.

    *** DISCLAIMER ***
    All Code is provided AS IS.
Page 1 of 1 (2 items)