Foros del Web » Programando para Internet » Javascript »

Lightwindow se ejecute solo

Estas en el tema de Lightwindow se ejecute solo en el foro de Javascript en Foros del Web. Hola a todos, tengo una web y quiero que al abrirse me dispare una imagen bajo el efecto dle lightwindow . Lightwindow trabaj como lightbox ...
  #1 (permalink)  
Antiguo 09/07/2009, 12:33
 
Fecha de Ingreso: octubre-2008
Mensajes: 140
Antigüedad: 15 años, 7 meses
Puntos: 1
Lightwindow se ejecute solo

Hola a todos, tengo una web y quiero que al abrirse me dispare una imagen bajo el efecto dle lightwindow. Lightwindow trabaj como lightbox pero es mucho mas eficiente y la sintaxis de los links son <a href='link.htm' class='lightwindow'>click</a> pero lo que quiero es que se ejecute automaticamente, he revisado el script pero no encuentro solución alguna.

Alguien me puede ayudar?

gracias de antemano
  #2 (permalink)  
Antiguo 09/07/2009, 12:44
Avatar de David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Respuesta: Lightwindow se ejecute solo

Citando la documentación:
Cita:
Create and Launch a Window with a Javascript Call.

To do this simply call activateWindow(id, options) function as show below. Just be sure to reference the myLightWindow object that is automatically created or use the one you have opted to.

Código javascript:
Ver original
  1. myLightWindow.activateWindow({
  2.     href: 'http://stickmanlabs.com/images/kevin_vegas.jpg',
  3.     title: 'Waiting for the show to start in Las Vegas',
  4.     author: 'Jazzmatt',
  5.     caption: 'Mmmmmm Margaritas! And yes, this is me...',
  6.     left: 300
  7. });

There are many options you can set, see below...
Código javascript:
Ver original
  1. href            // The hyperlink for the window
  2. title           // Title of window
  3. author          // Author of window
  4. caption         // The Caption for the window
  5. rel             // Set the rel tag
  6. top             // Top position of the window
  7. left            // Left position of the window
  8. type            // The type of the window you want to change it too
  9. showImages      // How many images to show
  10. height          // The height of the window
  11. width           // The width of the window
  12. loadingAnimation    // Make the Loading Cover skip the animation
  13. iframeEmbed         // Emebed the Media into an iframe instead of a div
  14. form            // The name of the form
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.
  #3 (permalink)  
Antiguo 09/07/2009, 13:22
 
Fecha de Ingreso: octubre-2008
Mensajes: 140
Antigüedad: 15 años, 7 meses
Puntos: 1
Respuesta: Lightwindow se ejecute solo

No se si soy yo pero no me funciona:

declaro la función:

<script>
function lightup(){
myLightWindow.activateWindow({
href:'http://credicoopluzyfuerza.coop/images/convenios/anuncio-privateacher.png',
title: 'Prueba',
params: 'lightwindow_type=external'});
}
</script>

y luego antes del </body> coloco

<script type="text/javascript">lightup();</script>
  #4 (permalink)  
Antiguo 09/07/2009, 13:25
 
Fecha de Ingreso: octubre-2008
Mensajes: 140
Antigüedad: 15 años, 7 meses
Puntos: 1
Respuesta: Lightwindow se ejecute solo

La web es http://credicoopluzyfuerza.coop
  #5 (permalink)  
Antiguo 09/07/2009, 13:36
Avatar de David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Respuesta: Lightwindow se ejecute solo

Prueba usando el evento onload para llamar a la función:
Código javascript:
Ver original
  1. window.onload = lightup;
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.
  #6 (permalink)  
Antiguo 09/07/2009, 14:07
 
Fecha de Ingreso: octubre-2008
Mensajes: 140
Antigüedad: 15 años, 7 meses
Puntos: 1
Respuesta: Lightwindow se ejecute solo

:( solo me funciona en chrome, en moxilla no me va. La web es http://credicoopluzyfuerza.coop.

Gracias por la ayuda!!!
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:46.