Hello, I am doing a checkbox list and in this list there is a check that checkbox that check all other checkboxes, I did a function on jquery that can do this task and works fine, however when I put "runat=server" in all my checkboxes it name changes and it doesn't work anymore.
The names of my checkboxes :
"ctl00$ContentPlaceHolder1$chkEmpresa
ctl00$ContentPlaceHolder1$chkEmpresaCod
ctl00$ContentPlaceHolder1$chkEmpresaCodRefExterno
ctl00$ContentPlaceHolder1$chkEmpresaRazaoSocial
ctl00$ContentPlaceHolder1$chkEmpresaCNPJ"
I wanted to catch the name 'ctl00$ContentPlaceHolder1$chkEmpresa' and whatever comes after, it takes, no matter what
And here is my jquery function :
"function CheckAll(checkbox) {
$("#chkEmpresa").click(function () {
$('input[name="' + checkbox.name + '"]').not(checkbox).prop('checked', checkbox.checked);
})
}"
If anyone want to see the front-end code of the checkboxes, just tell me and i send a print or another type of document. I don't know why, but i can't attach my txt here