Hello, good morning I have a question class in an accordion with the data brought in an ajax and I would like you to say if I answer question 1 by clicking on the button the background of that question will be colored I have an onclick this is the function of that onclick
function autocompletar_tec_ins_inc(){
//alert("ejecutando autocompletar_tec_ins_inc...");
}
//funcion autocompletar_tec_ins_inc
function Fagregartecins_inc_1(){
//alert("Incumplió rta1");
if (confirm("DESEA ENVIAR AL TECNICO AL INCUMPLIMIENTO")){
tec_inc_id_tecnicos_1 = $('#txt_tec_ins_inc_1').val();
tec_inc_id_pregunta_1 = 1; //$('#txt_tec_inc_id_pre_2').val();
if(tec_inc_id_tecnicos_1 == '' || tec_inc_id_tecnicos_1 == null){
alert('Debe seleccionar un técnico.');
return;
}
var datosTecInc1 = {
tec_inc_id_tecnicos : tec_inc_id_tecnicos_1,
tec_inc_id_pregunta : tec_inc_id_pregunta_1
};
//alert("agregando tecnico..." + tec_inc_id_tecnicos_1);
$.post('php/agregartecinc.php', datosTecInc1, function(data, textStatus, xhr) {
//alert("Procesando...");
if (data == 0){
alert('No se pudo procesar Se encuentra repetido');
return;
}
if (data == 2){
alert('No se ha ingresado el técnico a la inspeccion.');
return;
}
if (data == 3){
alert('No se pudo procesar. Error al insertar.');
return;
}
if (data == 5){
alert('Cedula de tecnico no encontrada.');
return;
}
if (data == 1){
alert('Se ha guardado correctamente el registro: ' + data);
$.post('php/cuadrilla_actualiza.php', datosTecInc1, function(data2, textStatus, xhr) {
//alert(data2);
$('#datoscuadrilla').html(data2);
});
return;
}
alert('Error:' + data);
});
return;
}
}