Ver Mensaje Individual
  #2 (permalink)  
Antiguo 31/05/2012, 03:30
Avatar de Lucieta86
Lucieta86
 
Fecha de Ingreso: noviembre-2010
Mensajes: 45
Antigüedad: 13 años, 5 meses
Puntos: 1
Respuesta: dialogo en jquery, problemas al abrirlo reiteradas veces

Finalmete solucione el problema.

Dejo aquí la solución por si alguien mas la necesita:

En el close: function() añadir $(this).remove(); y en la funcion de dentro del ajax, tambien.

Pego el código final del código del dialogo:

Código Javascript:
Ver original
  1. $( "#dialog-form" ).dialog({
  2.         autoOpen: false,
  3.         height: 600,
  4.         width: 350,
  5.         modal: true,
  6.         buttons: {
  7.             "Realizar Reserva": function() {
  8.                
  9.                 //Llamar a otro formulario             
  10.                 var param="";
  11.                
  12.                 var fIni= $("#fyhini").text();
  13.                 var fFin= $("#fyhfin").text();
  14.                 var aulas = $("#espacioSelec").text();
  15.                 var resp=$("#name").val();
  16.                
  17.                
  18.                     param="fIni="+fIni+"&fFin="+fFin+"&aulas="+aulas+"&resp="+resp;
  19.                
  20.                     $.ajax({
  21.                         type: "POST",
  22.                         url: "infoReserva.php",
  23.                         data: param,
  24.                         success: function(datos){
  25.                             $(this).remove();
  26.                             $("#cargarForm").html(datos);
  27.                         }
  28.                     });
  29.                            
  30.                     $( this ).dialog( "close" );
  31.                        
  32.             },
  33.             "Cancelar": function() {
  34.                 $( this ).dialog( "close" );
  35.             }
  36.         },
  37.         close: function() {
  38.             $(this).remove();
  39.  
  40.         }
  41.         });

Saludos