0

i want to Show the second block of check boxes if first block of checkboxes completed. i.e; first block has 2 or 3 check box if all were selected then second block will be displayed and same technique will be used for third one.

please help me.

3
Contributors
5
Replies
14
Views
2 Years
Discussion Span
Last Post by codevzv
0

Add a jquery function to each checkbox in the first group, either as a click or change function, and from that click/change call a method that examines each checkbox and if they are all checked, displays the second set.
Something like:

$(document).ready(function() {
    $('#checkbox1').change(function() {
        checkCheckboxes();
    });
    // or the click method
    $('#checkbox1').click(function() {
        if ($(this).is(':checked')) {
            checkCheckboxes();;
        }
    });
});

function checkCheckboxes() {
    if (all checkboxes are checked) {
        $('.secondSet').css('display', 'block');
    }
}
0
I am using the asp page unable to understand.  all checkboxes are dynamic created.

Please help
0
function showSelect(n) {


 if (document.getElementById("s"+(n)+"_"+"c"+(n)).checked)
 {

    document.getElementById("s"+(n+1)+"_"+"c"+(n+1)).style.display ="block";
 }
 else
 {
  for (x=n+1;x<=4;x++) {

    document.getElementById("s"+x +"_"+"c"+x).style.display ="none";

    document.getElementById("s"+x +"_"+"c"+x).checked=false;
   }
  }
}



             <input type="checkbox" id="s<%=sem%>_c<%=coff%>" name="c<%=cnt%>" value="<%=sid%>"  onclick = "showSelect(s<%=sem%>_c<%=coff%>)" <% if sem>2 then response.Write("style='display:none'") %>>
            <%else%>

            <input type="radio" id="s<%=sem%>_c<%=coff%>" value="<%=sid%>" name="c<%=cnt%>" onclick = "showSelect(s<%=sem%>_c<%=coff%>)" <% if sem>2 then response.Write("style='display:none'") %>>
0

Hmmm, a down and no comment. Wish whoever did those could at least explain themselves.

Anyway, I'm not sure what trouble you are having now. I'll see if I can find the time to put a sample of what I mean together. Probably be easier.

0

I appreicate hericles .first u ask about checkbox,then u say i am using asp.ask with understanding of terms and with reference

Edited by codevzv

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.