I have an application where a table is loaded dynamically via ajax, and inside the table there is a condition, if the condition is true I have to load a checkbox next to each name that is loaded, but when I load my application and I try to choose one of the checkboxes, checkbox does not stay checked
CALL AJAX
$.ajax({
type: "POST",
url:"inserir_sc_ajax.php",
data:dados,
success: function(result){
if(result.length > 2){
$("#fluxo").html('');
$("#fluxo").append(result);
}else{
var option = "<option value='' >Nao Existe Fluxo para Este Grupo</option>";
$("#fluxo").html('');
$("#fluxo").append(option);
}
}
});
CODE
while ($ln2 = mysql_fetch_array($query)) {
if($ln2['codNIvel'] == 2){
echo "<tr>";
echo "<td> <input type='checkbox' checked name='codRequestManager' value='{$ln2['codUser']}' /> ". $ln2['nome'] ." </td>";
echo "</tr>";
}else{
echo "<tr>";
echo "<td> ". $ln2['nome'] ." </td>";
echo "</tr>";
}
}