Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/07/2016, 10:17
Avatar de MaNuX0218
MaNuX0218
 
Fecha de Ingreso: marzo-2014
Mensajes: 787
Antigüedad: 10 años, 1 mes
Puntos: 67
Respuesta: Ajax con post no envía datos...

Prueba de esta manera haber que tal:

Código Javascript:
Ver original
  1. $.ajax({
  2.             type:"POST",
  3.             url:"sendmsg.php",
  4.             data: {
  5.                         nombre: $("#nombre").val(),
  6.                         email: $("#email").val(),
  7.                          mensaje: $("#mensaje").val()
  8.                         },
  9.             success:function(){
  10.                 $('#boton_envio').hide();
  11.                 $('.enviook').css('display','block');
  12.                 $('.enviook').fadeOut(5000,function(){
  13.                     $('.boton_envio').fadeIn('slow');
  14.                 });
  15.                 $('#respuesta').load('sendmsg.php');
  16.                 $("#nombre").val("");
  17.                 $("#email").val("");
  18.                 $("#mensaje").val("");
  19.             },  //Fin function Success
  20.             error:function(){
  21.                 $('.boton_envio').hide();
  22.                 $('.errorenvio').css('display','block');
  23.                 $('.errorenvio').fadeOut(5000,function(){
  24.                     $('.boton_envio').fadeIn('slow');
  25.                 });
  26.             }   //Fin function Error
  27.     });

Saludos.