Foros del Web » Programando para Internet » Javascript » Frameworks JS »

aprendiendo ventanas modals

Estas en el tema de aprendiendo ventanas modals en el foro de Frameworks JS en Foros del Web. Hola. Intento comprender el funcionamiento de las ventanas modales y el paso de datos con acciones a ajax. Probando, he seguido pienso todos los pasos, ...
  #1 (permalink)  
Antiguo 01/10/2012, 11:45
 
Fecha de Ingreso: junio-2008
Mensajes: 291
Antigüedad: 15 años, 10 meses
Puntos: 9
aprendiendo ventanas modals

Hola. Intento comprender el funcionamiento de las ventanas modales y el paso de datos con acciones a ajax. Probando, he seguido pienso todos los pasos, pero me da errores de widget, etc.. no cargados, a pesar de que los he incluido:

Código:
 <script src="http://code.jquery.com/jquery-latest.js"></script>	
 <link rel="stylesheet" type="text/css" href="ui/smoothness/jquery-ui-1.8.24.custom.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

mi script:
Código Javascript:
Ver original
  1. <script>
  2. $(document).ready(function() {  
  3.  
  4. $("a.ico-resize").click(function() {
  5.    
  6.      $("#dialog").dialog({
  7.                     resizable: false,
  8.                     height:140,
  9.                     width: 400,
  10.                     modal: true,
  11.                     title: 'Do you want to delete ?',
  12.                     buttons: {
  13.                         'Delete ?': function() {
  14.                     var dataString = 'id='+ id ;
  15.  
  16.                             $.ajax({
  17.                             type: "POST",
  18.                             url: "../includes/forms/delete_member.inc.php",
  19.                             data: dataString,
  20.                             cache: false,
  21.  
  22.                             success: function()
  23.                             {
  24.                                 parent.fadeOut('slow', function() {$(this).remove();});
  25.                                 $("#dialog").dialog('close');              
  26.                             }
  27.                     });                                
  28.                         },
  29.                         Cancel: function() {
  30.                            $(this).dialog('close');
  31.                         }
  32.                     }
  33.                 });
  34.                            
  35.             return false;
  36.             });
  37.                            });
  38.    
  39. </script>


mi html


Código:
<div id="dialog"></div>
  #2 (permalink)  
Antiguo 03/10/2012, 05:20
 
Fecha de Ingreso: septiembre-2012
Ubicación: Buenos aires
Mensajes: 110
Antigüedad: 11 años, 6 meses
Puntos: 9
Respuesta: aprendiendo ventanas modals

<< $.ajax({
async:true,
type:"POST",
dataType:"html",
contentType: "application/x-www-form-urlencoded",


beforeSend: function(){
Contenedor.val('<img src="Imagenes/Loading.gif" width="25" height="25" />Cargando...');
},

url:"Include/Slide_Content.php",
data:"id="+Valor,
success: function(data){
Contenedor.html(data);
},
error: function(){
alert('A surgido un error! :O \n Volve a intentarlo más tarde');
},
timeout:4000


})
>>
  #3 (permalink)  
Antiguo 04/10/2012, 10:41
 
Fecha de Ingreso: junio-2008
Mensajes: 291
Antigüedad: 15 años, 10 meses
Puntos: 9
De acuerdo Respuesta: aprendiendo ventanas modals

Perfecto! Gracias!

Etiquetas: ajax, funcion, html, js, ventanas
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 11:35.