Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/02/2016, 02:18
mikil
 
Fecha de Ingreso: agosto-2002
Ubicación: Lleida
Mensajes: 506
Antigüedad: 21 años, 8 meses
Puntos: 0
Unexpected token <

hola a todos,
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:
function 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;
}
y la funcion php paginarpersonal.php
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(=> $tabla,
                   
=> $lista);
    
    echo 
json_encode($array); 
el problema me ha aparecido al subir el proyecto al servidor en producción, ya que en la màquina en local no me aparece el error, pero no encuentro el problema para poder solucionarlo.