Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/06/2014, 10:57
vlademirss
 
Fecha de Ingreso: mayo-2007
Mensajes: 16
Antigüedad: 16 años, 11 meses
Puntos: 0
Respuesta: Ajax anidado ejecuta doble trile ves php

Veo que mi problema no es el ajax anidado, por que teniendo solo esto

Código:
$('#enviar').on('click', function() {
        $('#frmagregar').on('submit', function(event) {
            event.preventDefault();
            var nombre = $('#nombre').val();
            $.ajax({
                type: 'POST',
                url: '../../controller/acciones_profesion.php',
                data: {accion: 1, nombre: nombre},
                success: function(data) {
                    if (data=true)
                    {
                        $('.good').html("Registro Exitoso...!!!");
                        $('.good').fadeIn('slow');
                        $('.datos,.option').show();
                        $('.good').fadeOut('slow');
                        $('#agregar').hide();
                        
                    }
                    else
                    {
                        $('.bad').fadeIn('slow');
                        setTimeout(function() {
                            $('.bad').fadeOut(500);
                        }, 2000);
                    }
                }
            });
        });
    });
igual registrad odble, triple, cudruple etc...