how to disable radiobutton with checkbox?

0

When I select a checkbox the radio buttons are blocked and the value is stored in the database, but when updating the page the checkbox returns me with checked but the radiobuton is not disabled , both the radio button as the checkbox are in the same field of the bd

 $('#ninguno_quiro').click(function() {
// Si esta seleccionado (si la propiedad checked es igual a true)
if ($(this).is(':checked') || $(this).is(':selected')  ) {
$('.radioquiru').attr('checked', false).attr('disabled', true);
$('.listado').attr('checked', true);
$("input[class=textoquiru]").attr('disabled',true);
} else {
$('.listado').attr('checked', false);
$('.radioquiru').attr('disabled', false);
}
});

$("input[id=ninguno_quiro][value='<%=ninguno_quiro%>']").prop("checked",true);
$("input[id=consulta_asa_e][value='<%=consulta_asa_e%>']").prop("checked",true);
$("input[name=consulta_asa_e][value='<%=consulta_asa_e%>']").prop("checked",true);
 $("input[name=ayuno_e][value='<%=ayuno_e%>']").prop("checked",true);
<td class="Subtitulo">SI</td>
<td class="Subtitulo">NO</td>
<td class="Subtitulo">NA.</td>
<td ><label ><input  type="checkbox" id="ninguno" name="ninguno" value="3"></label></td>
 <td class="Subtitulo">ACTIVIDAD</td>
<tr>
<td><label >Consulta (ASA)</label></td>
<td><input type="radio" value="1" id="miradio1"  name="consulta_asa_e" class="radioquiru"></td>
<td><input type="radio" value="2" id="miradio2" name="consulta_asa_e" class="radioquiru" /></td>
 <td><label ><input  type="checkbox" value="3" id="consulta_asa_e"  class="listado"></label></td>
</tr>
<tr>
<td><label for="conf_nom_proc"> 6 a 8 horas</label></td>
<td><input type="radio" value="1" id="miradio3" name="ayuno_e"  class="radioquiru"/></td>
<td><input type="radio" value="2" id="miradio4" name="ayuno_e" class="radioquiru"/></td>
 <td><label for="chk3"><input type="checkbox" value="3" id="ayuno_e" class="listado"/></label></td>
</tr>
    
asked by Julio Cesar 14.09.2017 в 19:29
source

0 answers