Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/06/2014, 15:45
joseberrocalobando
 
Fecha de Ingreso: mayo-2014
Ubicación: Liberia, Guanacaste, Costa Rica
Mensajes: 17
Antigüedad: 9 años, 11 meses
Puntos: 0
problemas con el ajax

Hola nuevamente tengo un problema resolviendo un extraño error con el ajax, ya que se me cae y no tengo idea del porque

Código Javascript:
Ver original
  1. function GrabarDatos(){
  2.         var nombres = $('#nombres').attr('value');
  3.         var ciudad = $('#ciudad').attr('value');
  4.         var alternativas = $("input[@name='alternativas']:checked").attr("value");
  5.         var telefono = $("#telefono").attr("value");
  6.         var fecha_nacimiento = $("#fecha_nacimiento").attr("value");
  7.  
  8.         $.ajax({
  9.             url: 'nuevo.php',
  10.             type: "POST",
  11.             data: "submit=&nombres="+nombres+"&ciudad="+ciudad+"&alternativas="+alternativas+"&telefono="+telefono+"&fecha_nacimiento="+fecha_nacimiento,
  12.             success: function(datos){
  13.                 ConsultaDatos();
  14.                 alert(datos);
  15.                 $("#formulario").hide();
  16.                 $("#tabla").show();
  17.             }
  18.         });
  19.         return false;
  20.     }

se cae justo cuando cae al ajax

esto es lo que recibe del otro lado, no se si tendra algo que ver

Código HTML:
Ver original
  1. $cedula = htmlspecialchars(trim($_POST['cedula']));
  2.     $nombre = htmlspecialchars(trim($_POST['nombre']));
  3.     $apellidos = htmlspecialchars(trim($_POST['apellidos']));
  4.     $direccion = htmlspecialchars(trim($_POST['direccion']));
  5.     $telefono = htmlspecialchars(trim($_POST['telefono']));
  6.     $ocupacion = htmlspecialchars(trim($_POST['ocupacion']));
  7.     $sexo  = htmlspecialchars(trim($_POST['sexo']));
  8.     $estado_civil = htmlspecialchars(trim($_POST['estado']));