Disable radio buttons!


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Disable radio buttons!

  1. #1
    Bragi Fannar Guest

    Disable radio buttons!


    Hi everybody!
    How can I disable radio buttons on a html page by clicking on a checkbox.
    If the checkbox = true then radio buttons = true, and vice versa.

    Thank you
    Bragi


  2. #2
    sami Guest

    Re: Disable radio buttons!


    "Bragi Fannar" <bragi@islenskmidlun.is> wrote:
    >
    >Hi everybody!
    >How can I disable radio buttons on a html page by clicking on a checkbox.
    > If the checkbox = true then radio buttons = true, and vice versa.
    >
    >Thank you
    >Bragi




    >document.forms[0].radiobuttonName.disabled = true

    Do it through JScript


  3. #3
    Bragi Fannar Guest

    Re: Disable radio buttons!


    "sami" <s@doesntexist.com> wrote:
    >
    >"Bragi Fannar" <bragi@islenskmidlun.is> wrote:
    >>
    >>Hi everybody!
    >>How can I disable radio buttons on a html page by clicking on a checkbox.
    >> If the checkbox = true then radio buttons = true, and vice versa.
    >>
    >>Thank you
    >>Bragi

    >
    >
    >
    >>document.forms[0].radiobuttonName.disabled = true

    >Do it through JScript
    >

    Thank's Sami
    I still need to know how to trigger the function when I click the checkbox?


  4. #4
    here you go(sami) Guest

    Re: Disable radio buttons!


    if(document.forms[0].theRadioBtn.checked == true){
    document.forms[0].whatEverUwannaDisable.disabled = true;
    }
    >>
    >>
    >>>document.forms[0].radiobuttonName.disabled = true

    >>Do it through JScript
    >>

    >Thank's Sami
    >I still need to know how to trigger the function when I click the checkbox?
    >



  5. #5
    Join Date
    Dec 2006
    Posts
    2
    Hello,

    I am trying to accomplish the same result but can't seem to make this work. So my question is what goes in the place of the red below:

    if(document.forms[0].theRadioBtn.checked == true){
    document.forms[0].whatEverUwannaDisable.disabled = true;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center