0

HTML :

<asp:CheckBoxList ID="CheckBoxList1"  runat="server">
    <asp:ListItem>C++</asp:ListItem>
    <asp:ListItem>ASP.Net</asp:ListItem>
    <asp:ListItem>Javascript</asp:ListItem>
    <asp:ListItem>CSS</asp:ListItem>
    <asp:ListItem>HTML</asp:ListItem>
    <asp:ListItem>Java</asp:ListItem>
    <asp:ListItem>Other</asp:ListItem>
</asp:CheckBoxList>
<div id="idskill">
    <asp:Label  ID="lblskilldescription" runat="server">Description</asp:Label>
    <asp:TextBox ID="txbskilldescription" runat="server" Width="150px" OnTextChanged="TextBox8_TextChanged" Rows="5" TextMode="MultiLine"></asp:TextBox>
</div>

Scripts :

function toggleDiv()
  {       
      $("#idskill").slideToggle("slow");
      return false;
  }

What I want is on selection Other div should toggle, on uncheck it should hide.

1

2 Answers 2

1

There should be "onchange" listener for the element. At least using JS we use the onchange event listener.

Sign up to request clarification or add additional context in comments.

Comments

0

Try like this might help.

function list_onclick() {
        var list = document.getElementById('CheckBoxList1');
        var inputs = list.getElementsByTagName("input");
        for (var i = 0; i < inputs.length; i++) {
            if (inputs[i].checked && inputs[i].value == "1") {
               //do your work
            }
            else{
            }
        }
    }

1 Comment

but how this function will get called automatically when selection is made..?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.