estoy haciendo un CRUD en ajax+php+javascript y en la llamada a crear la lista de registros me da el error
Uncaught SyntaxError: Unexpected token <$.ajax.success @ jsppersonal.js:114fire @ jquery.js:3099self.fireWith @ jquery.js:3211done @ jquery.js:9310callback @ jquery.js:9720
la funcion de carga es
Código:
y la funcion php paginarpersonal.phpfunction pagination(partida){
var url = '../php/paginarpersonal.php';
$.ajax({
type:'POST',
url:url,
data:'partida='+partida,
success:function(data){
var array = eval(data);
console.log(array);
$('#agrega-registros').html(array[0]);
$('#pagination').html(array[1]);
}
});
return false;
}
Código PHP:
$limit=0; $nroLotes=10;
$registro = mysql_query("SELECT idPersonal, nomPersonal FROM agenda order by idPersonal LIMIT $limit, $nroLotes ");
$tabla = $tabla.'<table class="table table-striped table-condensed table-hover">
<tr>
<th width="100">Id </th>
<th width="200">Nombre</th>
<th width="50">Opciones</th>
</tr>';
while($registro2 = mysql_fetch_array($registro)){
$tabla = $tabla.'<tr>
<td>'.$registro2['idPersonal'].'</td>
<td>'.$registro2['nomPersonal'].'</td>
<td><a href="javascript:editarPersonal('.$registro2['idPersonal'].');" class="glyphicon glyphicon-edit"></a> <a href="javascript:eliminarPersonal('.$registro2['idPersonal'].');" class="glyphicon glyphicon-remove-circle"></a></td>
</tr>';
}
$tabla = $tabla.'</table>';
$array = array(0 => $tabla,
1 => $lista);
echo json_encode($array);


