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

abrir ventana popup con qtip

Estas en el tema de abrir ventana popup con qtip en el foro de Frameworks JS en Foros del Web. hola amigos estoy trabajando con qtip y jquery y necesito abrir una ventana popup hasta el momento me enlaza a ota pagina pero necesito que ...
  #1 (permalink)  
Antiguo 24/05/2012, 09:51
 
Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 13 años, 6 meses
Puntos: 6
abrir ventana popup con qtip

hola amigos estoy trabajando con qtip y jquery y necesito abrir una ventana popup
hasta el momento me enlaza a ota pagina pero necesito que sea una ventana popup
<a href="content.html" id="link_content">Ver Mas:</span></a>


eventRender: function (event, element) {
element.qtip({
content: {
title: { text: event.title },

text:'<span class="title">Evento N°:</span>'+ event.id+'<br><span class="title">Inicio: </span>' + ($.fullCalendar.formatDate(event.start, 'hh:mmtt')) + '<br><span class="title">Fin: </span>' + ($.fullCalendar.formatDate(event.end, 'hh:mmtt'))+ '<br><span class="title">Autor: </span>'+event.ejemplo+'<br><span class="title"><a href="content.html" id="link_content">Ver Mas:</span></a>'
},
  #2 (permalink)  
Antiguo 24/05/2012, 10:33
 
Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 13 años, 6 meses
Puntos: 6
Respuesta: abrir ventana popup con qtip

estoy intentando abrir la venta popup con este codigo pero no logro implementario

window.open ("http://www.javascript-coder.com","mywindow","menubar=1,resizable=1,width =350,height=250");


+'<br><span class="title"><a href="content.html" id="link_content">Ver Mas:</span></a>'
  #3 (permalink)  
Antiguo 24/05/2012, 11:15
 
Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 13 años, 6 meses
Puntos: 6
Respuesta: abrir ventana popup con qtip

amigos estoy tratando de implementar la ventana modal

y tengo el siguiente codigo

Código Javascript:
Ver original
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <script type="text/javascript" src="jquery-1.2.6.js"></script>
  5. <script language="javascript">
  6. $( document ).ready( function() {
  7.     $("a[rel='pop-up']").click(function () {
  8.         var caracteristicas = "height=700,width=800,scrollTo,resizable=1,scrollbars=1,location=0";
  9.         nueva=window.open(this.href, 'Popup', caracteristicas);
  10.         return false;
  11.  });
  12. });
  13. </script>
  14. </head>
  15. <body>
  16. <p><a href="ventana.html" rel="pop-up">ABRIR POP UP</a></p>
  17. </body>
  18. </html>

este funciona perfecto pero lo necesito integrar con el siguiente codigo


Código Javascript:
Ver original
  1. eventRender: function (event, element) {
  2.  
  3.    
  4.         element.qtip({    
  5.             content: {    
  6.                 title: { text: event.title },
  7.                
  8.                 text:'<span class="title">Evento N°:</span>'+ event.id+'<br><span class="title">Inicio: </span>' + ($.fullCalendar.formatDate(event.start, 'hh:mmtt')) + '<br><span class="title">Fin: </span>' + ($.fullCalendar.formatDate(event.end, 'hh:mmtt'))+ '<br><span class="title">Autor: </span>'+event.ejemplo+'<p><a href="ventana.html" rel="pop-up">ABRIR POP UP</a></p>'      
  9.             },
  10.            
  11.              show: {
  12.             when: 'click',
  13.             solo: true // Only show one tooltip at a time
  14.          },
  15.             hide: { when: 'inactive', delay: 3000 },
  16.             style: {
  17.                 width: 300,
  18.                 padding: 5,
  19.                 color: 'black',
  20.                 textAlign: 'left',
  21.                 border: {
  22.                 width: 1,
  23.                 radius: 3
  24.              },
  25.                 tip: 'topLeft',
  26.  
  27.                 classes: {
  28.                     tooltip: 'ui-widget',
  29.                     tip: 'ui-widget',
  30.                     title: 'ui-widget-header',
  31.                     content: 'ui-widget-content'
  32.                 }
  33.             }
  34.                   });
  35.     }

me abre una nueva ventana pero no es popup

que estoy haciendo mal?
  #4 (permalink)  
Antiguo 24/05/2012, 23:22
 
Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 13 años, 6 meses
Puntos: 6
Respuesta: abrir ventana popup con qtip

amigos ya logro abrir la ventana popup pero no logro que tome las medidas width y height,

la venta que abro es de toda la pantalla

este es mi codifo

Código Javascript:
Ver original
  1. text:'<a href="ventana.html" target="popup" onClick="window.open(this.href, this.target, width=150,height=200); return false;">Lanzar correctamente</a>',
  #5 (permalink)  
Antiguo 24/05/2012, 23:39
Avatar de Nemutagk
Colaborador
 
Fecha de Ingreso: marzo-2004
Ubicación: México
Mensajes: 2.633
Antigüedad: 20 años
Puntos: 406
Respuesta: abrir ventana popup con qtip

o.O tal vez sea porque te falta agregar comillas simples?...

Código Javascript:
Ver original
  1. window.open(this.href, this.target, 'width=150,height=200')

el metodo open de window solo acepta 3 parámetros, el url, el nombre del popup y las propiedades...
__________________
Listo?, tendría que tener 60 puntos menos de IQ para considerarme listo!!!
-- Sheldon Cooper
http://twitter.com/nemutagk
PD: No contestaré temas vía mensaje personal =)
  #6 (permalink)  
Antiguo 24/05/2012, 23:46
 
Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 13 años, 6 meses
Puntos: 6
Respuesta: abrir ventana popup con qtip

Nemutagk gracias por responder

no me funciona todavia con lo que me indicas , talves es porque estoy creando la ventana popup desde codigo javascript

Código Javascript:
Ver original
  1. '<a href="ventana.html" target="popup" onClick="window.open(this.href, this.target, width=150,height=200); return false;">Lanzar correctamente</a>',
  #7 (permalink)  
Antiguo 24/05/2012, 23:50
Avatar de Nemutagk
Colaborador
 
Fecha de Ingreso: marzo-2004
Ubicación: México
Mensajes: 2.633
Antigüedad: 20 años
Puntos: 406
Respuesta: abrir ventana popup con qtip

mmm yo no veo las comillas en las propiedades de open.... sigues teniendo el código igual que antes, ve el ejemplo que deje...

PD: no importa si generas el link mediante HTML directo o dinamicamente con javascript...
__________________
Listo?, tendría que tener 60 puntos menos de IQ para considerarme listo!!!
-- Sheldon Cooper
http://twitter.com/nemutagk
PD: No contestaré temas vía mensaje personal =)
  #8 (permalink)  
Antiguo 25/05/2012, 00:11
 
Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 13 años, 6 meses
Puntos: 6
Respuesta: abrir ventana popup con qtip

gracias a la gran ayuda de Nemutagk

este es el codigo funcional

Código Javascript:
Ver original
  1. text:'<a href="ventana.html" target="popup" onClick="window.open(this.href, this.target, \'width=250,height=200\'); return false;">Lanzar correctamente</a>',
  #9 (permalink)  
Antiguo 27/05/2012, 19:45
Avatar de gildus  
Fecha de Ingreso: agosto-2003
Mensajes: 1.495
Antigüedad: 20 años, 8 meses
Puntos: 105
Respuesta: abrir ventana popup con qtip

Holas,

Al inicio del post vi una parte del onclick en jquery que venia de un tag A, y creo que mejor lo pudieras haber hecho asi:

Código Javascript:
Ver original
  1. $( document ).ready( function() {
  2.     $("a[rel='pop-up']").click(function ([B]e[/B]) {
  3.         [B]e.preventDefault();[/B]
  4.         var caracteristicas = "height=700,width=800,scrollTo,resizable=1,scrollbars=1,location=0";
  5.         nueva=window.open(this.href, 'Popup', caracteristicas);
  6.         return false;
  7.  });
  8. });

Trata de siempre ir depurando paso por paso con el firebug te puede ayudar mucho, no esperes mucho que te lo digan paso por paso, pero seria bueno que intentes e ir probando y probando.

Sobre el texto no crees que mejor seria asi ? :
Cita:
text:'<a href="ventana.html" target="popup" onclick="window.open(\''+this.href+'\', \''+this.target+'\', \'width=250,height=200\'); return false;">Lanzar correctamente</a>',
Trata de investigarle y darle un poco mas de tiempo.

Saludos
__________________
.: Gildus :.

Etiquetas: html, jquery, popup, qtip, 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 10:04.