I'm new to this ... any help is welcome.
I have a modal view where I load a table, I have a checkbox for each row, I want to update the fields that are only selected, (get the values of the elements that are selected) and then make an update, now this is my code Thank you very much to the people who can help me.
<td><?php echo $verDetalle['itemCode'] ?></td>
<td><?php echo $verDetalle['dscription'] ?></td>
<td><?php echo $verDetalle['causal'] ?></td>
<td><?php echo $verDetalle['mensaje'] ?></td>
<td>
<input type="checkbox" value="<?php echo $verDetalle['id_linea'] ?>" id ="ErrorPrecio"/>
</td>
with the id of the checkbox I'm getting the value with the property .val () but only metes a single value ... the first one
this is what I do with javaascript
$("#prueba").click(function(){
errorPrecio=$('#ErrorPrecio').val();
cadena= "errorPrecio="+ errorPrecio;
alert(cadena);
$.ajax({
type:"POST",
url:"../php/actualizaPrecio.php",
data:cadena,
success:function(r){
if (r==false) {
alertify.error("Fallo la transaccion, Intente de nuevo o contacte al Administrador");
}else{
alertify.success("Actualizado con exito");
}
}
});
});