Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/04/2012, 12:54
kokoou
 
Fecha de Ingreso: enero-2008
Ubicación: Buenos Aires
Mensajes: 305
Antigüedad: 16 años, 3 meses
Puntos: 14
Respuesta: Submit y funcion ajax no funcionan

Código Javascript:
Ver original
  1. <script type="text/javascript">
  2.         $(document).ready(function(){
  3.  
  4.            $("#f1").submit(function(){
  5.  
  6.                 $.ajax({
  7.                     type : "POST",
  8.                     url : $(this).attr("action"),
  9.                     data : $(this).serialize(),
  10.                     dataType: "html",
  11.                     beforeSend: function(){
  12.                         $("#principal").fadeOut();
  13.                         $("#carga").fadeIn();
  14.                     },
  15.                     success: function(data){
  16.                         $("#carga").fadeOut();
  17.                         $("#principal").fadeIn();
  18.                         alert(data);
  19.                     }
  20.                 }); // aca te faltaba el punto y coma      
  21.  
  22.            }); // aca te faltaba el punto y coma
  23.                
  24.         }); // aca te faltaba el punto y coma
  25.     </script>
__________________
http://lucasmg.com.ar