Enable & Disable radio buttons when the User clicks on one

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sumanbangladesh
    New Member
    • Sep 2007
    • 4

    Enable & Disable radio buttons when the User clicks on one

    Hi
    I have a page with 3 radio butons. If I select a specific one,then I like to view some other radio buttons otherwise the other radio buttons will be remain disabled or invisible.

    I am very new in Javascript and waiting for your kind response

    Thanks in advance
  • shane3341436
    New Member
    • Mar 2007
    • 63

    #2
    you can use the style property of that particular id eg.
    to show the radio button
    document.getEle mentById("id"). style.display=" block"
    and to hide the radio button
    document.getEle mentById("id"). style.display=" none"

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      If you want to disable them instead of hiding them, use the disabled property and set it to false.

      Edit: er, that should be true, of course.

      Comment

      • sumanbangladesh
        New Member
        • Sep 2007
        • 4

        #4
        Originally posted by shane3341436
        you can use the style property of that particular id eg.
        to show the radio button
        document.getEle mentById("id"). style.display=" block"
        and to hide the radio button
        document.getEle mentById("id"). style.display=" none"

        the problem is solved......... ..........Thank U

        Comment

        Working...