Radio Button

Discussion in 'ASP General' started by amatuer, Jul 11, 2006.

  1. amatuer

    amatuer Guest

    I have a radio button that i checked depending on a staement. The
    problem is that if i want to uncheck it ,it doesnt allow. Is it
    possible to uncheck it. heres the code i used for the radio button:
    <input type="radio" name="MediaName" value="Others" <% If tel1=tel2
    Then %> Checked<% End If %>>
     
    amatuer, Jul 11, 2006
    #1
    1. Advertising

  2. amatuer

    CJM Guest

    "amatuer" <> wrote in message
    news:...
    >I have a radio button that i checked depending on a staement. The
    > problem is that if i want to uncheck it ,it doesnt allow. Is it
    > possible to uncheck it. heres the code i used for the radio button:
    > <input type="radio" name="MediaName" value="Others" <% If tel1=tel2
    > Then %> Checked<% End If %>>
    >



    <script language="JavaScript">
    <!--
    function clear_radio_buttons() {
    for (var i = 0; i < document.form1.MediaName.length; i++) {
    document.form1.MediaName.checked = false;
    }
    }
    //-->
    </script>
     
    CJM, Jul 11, 2006
    #2
    1. Advertising

  3. amatuer

    amatuer Guest

    by the looks of it ,i dnt think this will allow me to uncheck wen the
    page is running.or will it?


    CJM wrote:
    > "amatuer" <> wrote in message
    > news:...
    > >I have a radio button that i checked depending on a staement. The
    > > problem is that if i want to uncheck it ,it doesnt allow. Is it
    > > possible to uncheck it. heres the code i used for the radio button:
    > > <input type="radio" name="MediaName" value="Others" <% If tel1=tel2
    > > Then %> Checked<% End If %>>
    > >

    >
    >
    > <script language="JavaScript">
    > <!--
    > function clear_radio_buttons() {
    > for (var i = 0; i < document.form1.MediaName.length; i++) {
    > document.form1.MediaName.checked = false;
    > }
    > }
    > //-->
    > </script>
     
    amatuer, Jul 11, 2006
    #3
  4. amatuer

    CJM Guest

    "amatuer" <> wrote in message
    news:...
    > by the looks of it ,i dnt think this will allow me to uncheck wen the
    > page is running.or will it?
    >


    Yes it will, but you need to call the function somewhere within your page. I
    would suggest a standard link.
     
    CJM, Jul 11, 2006
    #4
    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. Scott D Johnson
    Replies:
    1
    Views:
    1,131
    Scott D Johnson
    Sep 27, 2006
  2. Jan C. Faerber
    Replies:
    0
    Views:
    644
    Jan C. Faerber
    Jun 30, 2009
  3. tshad
    Replies:
    6
    Views:
    7,291
    Alexey Smirnov
    Nov 26, 2009
  4. Martin
    Replies:
    8
    Views:
    3,473
    Jan C. Faerber
    Nov 24, 2009
  5. Hiten
    Replies:
    1
    Views:
    702
    Vidar Petursson
    May 26, 2004
Loading...

Share This Page