* tengo una columna asignar que es un link, y tiene una llamada al método asignar y le envía el id del la fila seleccionada.
Código
<table class="table table-bordered" id="todos" >
<tr bgcolor="#FF9292">
<!-- <th>Categoria</th>
<th>Estado</th>-->
</tr>
<?php foreach ($lista as $activo) { ?>
<tr style="background-color:<?php echo $this->cycle(array("#F0F0F0", "#FFFFFF"))->next() ?>" >
<!-- <td><?= $activo["Nombrecategoria"] ?></td>
<td><?= $activo["Nombreestado"] ?></td>-->
</tr>
<?php } ?>
</table>
*Aqui el Script con la funcion asignar
Código
function asignar(id)
{
var id1= id;
$.ajax({
type: "POST",
data: "id="+id1 ,
dataType: "html",
url: 'procesar.php',
beforeSend: function () {
// imagen de carga
$("#resultado").html("<p align='center'><img src='../../img/loading.gif' /></p>");
},
error: function (jqXHR, exception) {
if (jqXHR.status === 0) {
alert('Not connect.\n Verify Network.');
} else if (jqXHR.status == 404) {
alert('Requested page not found. [404]');
} else if (jqXHR.status == 500) {
alert('Internal Server Error [500].');
} else if (exception === 'parsererror') {
alert('Requested JSON parse failed.');
} else if (exception === 'timeout') {
alert('Time out error.');
} else if (exception === 'abort') {
alert('Ajax request aborted.');
} else {
alert('Uncaught Error.\n' + jqXHR.responseText);
}
},
success: function (data) {
//
$("#resultado").empty();
$("#todos").empty();
$("#resultado").append(data);
}
});
}
procesar.php
Código
$idActivo = $this->request->getPost("id");
$insert = $asignacion->asignar($idActivo, $documento, "2014-10-10");
no se que estoy haciendo mal pero cuando click en link Asignar me sale Internal Server Error [500].
Le agradecería mucho si alguien sabe que estoy haciendo mal.


 
  




 Autor
 Autor
		


 En línea
									En línea
								



 
						
