Q:

Hiding and disabling elements based on a combobox's value with JavaScript

I have a page where, depending on whether the value of a combobox is false (no), an input box should be hidden and a fieldset disabled.  When the combobox's value changes to true (yes), the form should show the input box and enable the fieldset. 
This is what I have so far:
<html>
<head>
<title>combo</title>
<script language="javascript">
    function ToggleDisplay(Section, boolHide) {
        if (boolHide == true) {
            Section.style.display = "none";
        }
        else {
            Section.style.display = "";
        }
    }

    function disableElement(element, boolHide)
    {
        var input =
          document.getElementById(element).getElementsByTagName("input");
            for(var i = 0; i < input.length; i++)
            {
                input[i].setAttribute("disabled",boolHide);
            }
        }

        function hideShowElement(CurrentSection, OtherSection, DisableSection)
        {
            var sectionVal = CurrentSection.value;
                if (sectionVal == 0) {
                    ToggleDisplay(OtherSection, true);
                    //disableGroup (this.form, 'Radio1' , true);
                    disableElement(DisableSection, "true");
                }
                else {
                    ToggleDisplay(OtherSection, false);
                    //disableGroup (this.form, 'Radio1' , true);
                    disableElement(DisableSection, "false");
                }
            }
</script>
</head>
<body>
<form name="testForm" action="" method="post">
    Show Hidden Text?    <select name="cmbYN"
      onchange="hideShowElement(this, MyDIV, 'OptionGrp1');">
        <option value="0" selected="selected"></option>
        <option value="1">Yes</option>
        <option value="0">No</option>
    </select>

    <div id="MyDIV" style="display: none">
        My Hidden Text: <input name="Text1" type="text" />
    <br>
    </div>
    <fieldset id="OptionGrp1" name="Group1">
        Option Group<br><br>
        Option 1<input name="Radio1" type="radio" checked>
        Option 2<input name="Radio1" type="radio">
    </fieldset>
</form>
</body>
</html>

This is hiding the input box and disabling the fieldset, but not re-enabling them. 

A:

You should change the display back to what it was before, normally block. 
        if (boolHide){
            Section.style.display = "none";
        }else {
            Section.style.display = "block";
        }

Also for the disabled, the proper way is setting the disabled attribute to disabled and removing it afterwards:               
            for(var i = 0; i < input.length; i++)
            { 
                if(boolHide){
                    input[i].setAttribute("disabled", "disabled");
                }else{
                    input[i].removeAttribute("disabled");
                }
            }

