Ver Mensaje Individual
  #13 (permalink)  
Antiguo 29/05/2009, 17:12
Avatar de futaman
futaman
 
Fecha de Ingreso: mayo-2009
Ubicación: FUTALANDIA
Mensajes: 16
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: Problema JAVASCRIPT

Código SOLUCION 5 - HTML+JS:
Ver original
  1. /*rutina que crea la ventana OPEN*/
  2. function fcrea()
  3. {
  4.     vaux=open("","","width=150,height=150,scrollbar=no,status=no");
  5.     with(vaux.document)
  6.     {
  7.         write("<html><head><title>Fotos</title></head>");
  8.         write("<body leftmargin='0' topmargin='0'>");
  9.         write("<center><img src='fotos/01.jpg' border='0' width='150' height='150'>");
  10.         write("</center></body></html>")
  11.         fventana(1);
  12.     }
  13. }
  14.  
  15.  
  16. /*Rutina que mueve la ventana*/
  17. d=1; // flag de control
  18. g=0;
  19. function fventana(a)
  20. { if(a==1)
  21.   { vaux.moveTo(screen.width/1,screen.height/1);}
  22.   if(vaux.closed==true)
  23.   { d=0;
  24.   }
  25.   else
  26.   { if(g<100)
  27.     { vaux.moveBy(0,-100);
  28.       g+=4;
  29.     }
  30.     else
  31.     { if(g<170)
  32.       { vaux.moveBy(-100,0);
  33.         g+=4;
  34.       }
  35.       else
  36.       { if(g<250)
  37.         {vaux.moveBy(0,0);}
  38.         else
  39.         { d=0}
  40.       }
  41.     }
  42.   }
  43.   if(d==1)
  44.   { b1=window.setTimeout("fventana(2)",100)}
  45.   else
  46.   { /*alert("Hola... bye bye");*/
  47.     window.clearTimeout(b1)
  48.   }
  49. }