Resultados 1 al 18 de 18

Como rotar iframes utilizando javascript???

Vista híbrida

Mensaje anterior Mensaje anterior   Próximo mensaje Próximo mensaje
  1. #1 Como rotar iframes utilizando javascript??? 
    Moderador HH
    Fecha de ingreso
    Jun 2006
    Ubicación
    Never mind that
    Mensajes
    979
    Descargas
    6
    Uploads
    0
    Buenas, el problema es el siguiente, en un edificio vigilado con cámaras de red tengo 16 cámaras por lo que he creado 4 páginas en donde se ven 4 cámaras en cada una de ellas.
    ¿Cómo podría hacer que después de X tiempo fuese cambiando la página en el monitor y hacer un bucle entre esas 4 páginas?

    He estado buscando en google pero no he encontrado nada, si para rotar imágenes fijas, banners.. pero no para que esos iframes vayan cambiando.

    No se me ocurre nada, para "llamar" a las cámaras lo hago de dos formas diferentes según el modelo, a la mayoría poniendo directamente su ip, a otras sin embargo las enlazo a través de un archivo html.

    Os pongo un código de ejemplo:
    Código:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    	<title>Camaras edificio hackhispano</title>
    </head>
    <body bottommargin="0" leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" topmargin="0">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
    	<td width="50%"><iframe id="ct111" name="ct111" src="Camara1.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct112" name="ct112" src="Camara2.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    <tr>
    	<td width="50%"><iframe id="ct113" name="ct113" src="http://XX.XX.XX.XX:XXXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct114" name="ct114" src="http://XX.XX.XX.XX:XXXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%">&nbsp;</td>
    </tr>
    </table>
    <br><br><br>
    </body>
    </html>
    Si a alguien se le ocurre algo se lo agradecería mucho. Saludos
    Citar  
     

  2. #2  
    Avanzado
    Fecha de ingreso
    Jun 2006
    Mensajes
    538
    Descargas
    3
    Uploads
    0
    Este c&#243;digo funciona, cambiandola a los 10 segundos, entre uno.html y dos.html, tendr&#237;as que poner este codigo para hacerlo rotar
    Quedar&#237;a mas "cuco", si usases divs llamadolo con ajax, pero de momento te servir&#225;:
    Código:
    <head>
    
    <script>
    function cambiaPage(){
            window.location ="dos.html";
    }
    </script>
    </head>
    <body onload="setTimeout('cambiaPage()',10000)">
    paginauno
    </body>
    Última edición por Ktorce; 26-04-2007 a las 14:38
    Citar  
     

  3. #3  
    Moderador HH
    Fecha de ingreso
    Jun 2006
    Ubicación
    Never mind that
    Mensajes
    979
    Descargas
    6
    Uploads
    0
    Gracias tio iba a contestarte que el anterior no me funcionaba y te has adelantado, ahora no puedo por la tarde lo pruebo. Saludos
    Citar  
     

  4. #4  
    Avanzado
    Fecha de ingreso
    Jun 2006
    Mensajes
    538
    Descargas
    3
    Uploads
    0
    Si, el error est&#225; en SetTimeOut, que realmente es setTimeout (la capitalizaci&#243;n), lo he corregido en mi anterior post

    El n&#250;mero de setTimeout, son los milisegundos que espera antes de cambiarlo, por lo que para probarlo si lo pones a 10000 te tendr&#237;a que saltar a los 10 segundos

    Salu2
    Citar  
     

  5. #5  
    Avanzado
    Fecha de ingreso
    Jun 2006
    Mensajes
    538
    Descargas
    3
    Uploads
    0
    Bueno, como me aburr&#237;a te he hecho esto, seg&#250;n est&#225; rota cada 30 segs (retardo=30000; ) entre las camaras que le pongas (url y titulo), y lo carga sobre la misma pagina. puedes poner todas las camaras que quieras (bueno, creo que el limite ser&#237;an 32.768, pero esto no lo tiene ni gran hermano). Sin saber si las paginas que cargas usan javascript interno, no he podido hacertelo con divs, ya que cuando haces el request, este no carga las funciones javascript de las paginas internas.

    Le he puesto a cada frame la opcion de bloquear, para que ese frame en concreto no rote.

    Salu2
    Código:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    	<title>Camaras edificio hackhispano</title>
    <script>
    	var retardo = 30000; //milisegundos en refrescarse los frames
    	var camaras = new Array();
    	camaras[1] = new Array();
    	camaras[1]['url'] = "http://www.hackhispano.com/foro/forumdisplay.php?f=2";
    	camaras[1]['titulo'] = "Hackhispano";
    	camaras[2] = new Array();
    	camaras[2]['url'] = "http://www.hackhispano.com/foro/forumdisplay.php?f=41";
    	camaras[2]['titulo'] = "News";
    	camaras[3] = new Array();
    	camaras[3]['url'] = "http://www.hackhispano.com/foro/forumdisplay.php?f=45";
    	camaras[3]['titulo'] = "Ciberactivismo";
    	camaras[4] = new Array();
    	camaras[4]['url'] = "http://www.hackhispano.com/foro/forumdisplay.php?f=50";
    	camaras[4]['titulo'] = "Proyectos";
    	camaras[5] = new Array();
    	camaras[5]['url'] = "http://www.hackhispano.com/foro/forumdisplay.php?f=18";
    	camaras[5]['titulo'] = "General";
    	camaras[6] = new Array();
    	camaras[6]['url'] = "http://www.hackhispano.com/foro/forumdisplay.php?f=9";
    	camaras[6]['titulo'] = "Ingenieria Inversa";
    	camaras[7] = new Array();
    	camaras[7]['url'] = "http://www.hackhispano.com/foro/forumdisplay.php?f=10";
    	camaras[7]['titulo'] = "Intrusion";
    	camaras[8] = new Array();
    	camaras[8]['url'] = "http://www.hackhispano.com/foro/forumdisplay.php?f=36";
    	camaras[8]['titulo'] = "Vulnerabilidades";
    	camaras[9] = new Array();
    	camaras[9]['url'] = "http://www.hackhispano.com/foro/forumdisplay.php?f=47";
    	camaras[9]['titulo'] = "Windows";
    	camaras[10] = new Array();
    	camaras[10]['url'] = "http://www.hackhispano.com/foro/forumdisplay.php?f=23";
    	camaras[10]['titulo'] = "Linux";
    	var ultimacamara=0;
    	function rotacion(divid){
    		if (!document.getElementById("blq"+divid).checked){
    			ultimacamara++;
    			if (ultimacamara > camaras.length -1)
    				ultimacamara = 1;
    			document.getElementById("labeldiv"+divid).innerHTML = camaras[ultimacamara]['titulo'];
    			document.getElementById("fr"+divid).src = camaras[ultimacamara]['url'];
    		}
    		setTimeout("rotacion("+divid+")",retardo);
    	}
    	function empiezaRotacion(){
    		rotacion(1);
    		rotacion(2);
    		rotacion(3);
    		rotacion(4);
    	}
    </script>
    <style>
    .TituloCamara {
    	font-family:Arial, Helvetica, sans-serif;
    	font-weight:bold;
    }
    </style>
    </head>
    <body bottommargin="0" leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" topmargin="0" onLoad="empiezaRotacion()">
    <table border="2" cellpadding="0" cellspacing="0" width="100&#37;" height="100%">
    <tr>
    	<td width = "50%"><table width="100%" height="100%"><tr><td width="100%"><div class="TituloCamara" id="labeldiv1"></div></td>
    	<td align="right" nowrap="nowrap">Bloquear :<input id="blq1" name="Bloquear" type="checkbox" value="Bloquear"></td>
    	</tr><tr><td colspan="2" height="100%"><iframe src="" id="fr1" width="100%" height="100%" scrolling="auto"  frameborder="0"></iframe></td></tr></table></td>
    	<td width="50%"><table width="100%" height="100%"><tr><td width="100%"><div class="TituloCamara" id="labeldiv2"></div></td><td align="right" nowrap="nowrap">Bloquear :<input id="blq2" name="Bloquear" type="checkbox" value="Bloquear"></td></tr><tr><td height="100%" colspan="2"><iframe src="" id="fr2" width="100%" height="100%" scrolling="auto" frameborder="0"></iframe></td></tr></table></td>
    </tr>
    <tr>
    	<td width="50%"><table width="100%" height="100%"><tr><td width="100%"><div class="TituloCamara" id="labeldiv3"></div></td><td align="right" nowrap="nowrap">Bloquear :<input id="blq3" name="Bloquear" type="checkbox" value="Bloquear"></td></tr><tr><td height="100%" colspan="2"><iframe src="" id="fr3" width="100%" height="100%" scrolling="auto"  frameborder="0"></iframe></td></tr></table></td>
    	<td width="50%"><table width="100%" height="100%"><tr><td width="100%"><div class="TituloCamara" id="labeldiv4"></div></td><td align="right" nowrap="nowrap">Bloquear :<input id="blq4" name="Bloquear" type="checkbox" value="Bloquear"></td></tr><tr><td height="100%" colspan="2"><iframe src="" id="fr4" width="100%" height="100%" scrolling="auto" frameborder="0"></iframe></td></tr></table></td>
    </tr>
    </table>
    </body>
    </html>
    Última edición por Ktorce; 26-04-2007 a las 17:29
    Citar  
     

  6. #6  
    Moderador HH
    Fecha de ingreso
    Jun 2006
    Ubicación
    Never mind that
    Mensajes
    979
    Descargas
    6
    Uploads
    0
    Joer, eres un crack, muchas gracias, me pasaba para decirte que funcionaba bien el c&#243;digo que me hab&#237;as dado antes y me encuentro esto...me gusta tu forma de aburrirte XD.

    Probar&#233; el nuevo c&#243;digo, por cierto una cosa sobre el primero, &#191;como volver&#237;a a la primera p&#225;gina?
    Supongo que si el contador lo tengo para 4 p&#225;ginas deber&#237;an ser 5 para incluir una 5&#186; que llamase a la primera para cerrar el bucle &#191;deber&#237;a ser as&#237;?
    Citar  
     

  7. #7  
    Avanzado
    Fecha de ingreso
    Jun 2006
    Mensajes
    538
    Descargas
    3
    Uploads
    0
    En la pagina cuatro.html, tendr&#237;as que poner el c&#243;digo para que llamase a la pagina uno.html
    Código:
    <head>
    
    <script>
    function cambiaPage(){
            window.location ="uno.html";
    }
    </script>
    </head>
    <body onload="setTimeout('cambiaPage()',10000)">
    paginacuatro
    </body>
    Si pones el c&#243;digo que devuelven las paginas propias de la camara, podemos mejorar la segunda p&#225;gina para que mejore en rendimiento y visibilidad de imagen de la c&#225;mara.

    Salu2
    Citar  
     

  8. #8  
    Moderador HH
    Fecha de ingreso
    Jun 2006
    Ubicación
    Never mind that
    Mensajes
    979
    Descargas
    6
    Uploads
    0
    Funciona!!!!!!! va genial, no sé si lo que has hecho es fácil o difícil pero te has ganado el gallifante, gracias de verdad.

    Solo puedo poner el código que me da una de las cámaras, los otros modelos utilizan java y no sé como conseguir su código.

    Esto es lo que da una Axis207
    Código:
    <SCRIPT LANGUAGE="JavaScript">
    // Set the BaseURL to the URL of your camera
    var BaseURL = "http://XX.XX.XX.XX:XXXX/";
    
    // DisplayWidth & DisplayHeight specifies the displayed width & height of the image.
    // You may change these numbers, the effect will be a stretched or a shrunk image
    var DisplayWidth = "510";
    var DisplayHeight = "310";
    
    // This is the path to the image generating file inside the camera itself
    var File = "axis-cgi/mjpg/video.cgi?resolution=480x360&clock=1&date=1";
    // No changes required below this point
    var output = "";
    if ((navigator.appName == "Microsoft Internet Explorer") &&
       (navigator.platform != "MacPPC") && (navigator.platform != "Mac68k"))
    {
      // If Internet Explorer under Windows then use ActiveX 
      output  = '<OBJECT ID="Player" width='
      output += DisplayWidth;
      output += ' height=';
      output += DisplayHeight;
      output += ' CLASSID="CLSID:DE625294-70E6-45ED-B895-CFFA13AEB044" ';
      output += 'CODEBASE="';
      output += BaseURL;
      output += 'activex/AMC.cab#version=4,0,16,0">';
      output += '<PARAM NAME="MediaURL" VALUE="';
      output += BaseURL;
      output += File + '">';
      output += '<param name="MediaType" value="mjpeg-unicast">';
      output += '<param name="ShowStatusBar" value="0">';
      output += '<param name="ShowToolbar" value="0">';
      output += '<param name="AutoStart" value="1">';
      output += '<param name="StretchToFit" value="1">';
      output += '<BR><B>Axis Media Control</B><BR>';
      output += 'The AXIS Media Control, which enables you ';
      output += 'to view live image streams in Microsoft Internet';
      output += ' Explorer, could not be registered on your computer.';
      output += '<BR></OBJECT>';
    } else {
      // If not IE for Windows use the browser itself to display
      theDate = new Date();
      output  = '<IMG SRC="';
      output += BaseURL;
      output += File;
      output += '&dummy=' + theDate.getTime().toString(10);
      output += '" HEIGHT="';
      output += DisplayHeight;
      output += '" WIDTH="';
      output += DisplayWidth;
      output += '" ALT="Camera Image">';
    }
    document.write(output);
    document.Player.ToolbarConfiguration = "play,+snapshot,+fullscreen"
    
    // Remove the '//' below to use the code for Motion Detection. 
      // document.Player.UIMode = "MDConfig";
      // document.Player.MotionConfigURL = "/axis-cgi/operator/param.cgi?ImageSource=0"
      // document.Player.MotionDataURL = "/axis-cgi/motion/motiondata.cgi";
    </SCRIPT>
    Citar  
     

  9. #9  
    Avanzado
    Fecha de ingreso
    Jun 2006
    Mensajes
    538
    Descargas
    3
    Uploads
    0
    Una vez que tocas varias p&#225;ginas, esto es bastante sencillito. El problema que puedes tener es que si no tienes una resolucion muy alta en el monitor, es posible que no se vean las imagenes completas y tengas que usar el scroll:
    Código:
    var DisplayWidth = "510";
    var DisplayHeight = "310";
    Con estos valores para esta camara, te caben justitas 2 fotos para 1024x768, aunque esto lo puedes ajustar (supongo que tambi&#233;n para las dem&#225;s camaras). Veo que trata de distinta manera si la cargas con IExplorer o otro navegador, para estos ultimos muestra una imagen, pero para IExplorer &#191;Que muestra?, es una imagen estatica y hasta que no refrescas no muestra una nueva?, es un v&#237;deo?.

    Para el resto de las c&#225;maras, habr&#237;a que verlo, pero en principio deber&#237;a bastar con darle un tama&#241;o del 100&#37; al espacio en pantalla que asigna al applet, y hacer la llamada directamente a el.

    Me alegra que te guste la pagina

    Salu2
    Citar  
     

  10. #10  
    Moderador HH
    Fecha de ingreso
    Jun 2006
    Ubicación
    Never mind that
    Mensajes
    979
    Descargas
    6
    Uploads
    0
    Esos parámetros de ancho y alto los he modificado yo para ajustar las cámaras a la resolución de pantalla de 1024X768, en las páginas que tenía creaba cuadros con las 4 cámaras que cubrían la pantalla.

    Con el modelo del que te he puesto el código (una Axis207) no tengo ningún problema porque es totalmente configurable, tengo un par de cámaras de este modelo pero el resto...es un coñazo, llevan java y las ves con la máquina virtual, come muchísimos recursos del ordenador, la imagen es peor y cada dos por tres está dando errores.
    La axis aprovecha perfectamente el espacio que le das para que emita la imagen, el resto utilizan un menu que se pone por encima de la imagen reduciéndola y que encima no funciona bien, la axis tiene la opción de crear tú mismo diferentes formatos como skins del winamp, algo similar, las otras...no se pueden ni tocar.
    Veo que trata de distinta manera si la cargas con IExplorer o otro navegador, para estos ultimos muestra una imagen, pero para IExplorer ¿Que muestra?, es una imagen estatica y hasta que no refrescas no muestra una nueva?, es un vídeo?.
    Es un vídeo, las camaras están emitiendo 24horas.

    Estuve trasteando un poco y me he dado cuenta de varias cosillas que intentaré mejorar, una de ellas es una cámara que en realidad son 4, me explico, es una dirección nada más pero es un grabador que controla a 4 cámaras coaxiales, este grabador ofrece un menú con la imagen de la cámara y 4 botones para que pinches la cámara que quieres ver, al cargarla en un espacio como el de las otras cámaras no se ve practicamente nada, de hecho yo lo tenía configurado de esta forma:
    Código:
    </head>
    <body bottommargin="0" leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" topmargin="0">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
    	<td width="50%"><iframe id="ct115" name="ct115" src="http://XX.XX.XX.XX:XXXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct116" name="ct116" src="http://XX.XX.XX.XX:XXXZ" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    <tr>
    	<td width="100%" colspan="2"><iframe id="ct117" name="ct117" src="http://XX.XX.XX.XX:XXXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 390px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%">&nbsp;</td>
    </tr>
    </table>
    <br><br><br>
    </body>
    </html>
    Es decir colocaba dos cámaras en la parte superior de la pantalla y la otra cámara (que en realidad son cuatro) en la parte inferior.

    En fin, cosillas que intentaré poco a poco ir configurando, gracias por todo otra vez. Saludos
    Citar  
     

  11. #11  
    Moderador HH
    Fecha de ingreso
    Jun 2006
    Ubicación
    Never mind that
    Mensajes
    979
    Descargas
    6
    Uploads
    0
    Tengo un problema con las cámaras porque no es posible sacarles la contraseña y entonces cada vez que cambia la página te saltan 4 mensajes para pedir la contraseña, entonces lo intento con el primer código que me dió Ktorce
    Código:
    <head>
    
    <script>
    function cambiaPage(){
            window.location ="dos.html";
    }
    </script>
    </head>
    <body onload="setTimeout('cambiaPage()',10000)">
    paginauno
    </body>
    Con este tal y como está tengo el mismo problema, hace que se cargue una página con lo cual aparecen los mensajes de las cámaras pidiendo la contraseña.

    Lo he intentado de la siguiente forma, en una misma página tengo todas las direcciones de las cámaras, me pide todas las contraseñas cuando abro esa página pero solo una vez, una vez hecho, ¿podría desplazarme dentro de esa página de forma automática? sin cargar nuevas páginas sino verticalmente en la misma página,lo que he hecho es crear enlaces dentro de la misma página pero con el código que me dió Ktorce no consigo que funcione

    ¿alguien sabe si es posible hacerlo?
    Última edición por Grenuille; 16-05-2007 a las 13:34
    Citar  
     

  12. #12  
    Moderador HH
    Fecha de ingreso
    Jun 2006
    Ubicación
    Never mind that
    Mensajes
    979
    Descargas
    6
    Uploads
    0
    Acabo de encontrar en esta página http://www.elcodigo.net/cgi-bin/DBread.cgi?tabla=scripts&campo=0&clave=88&info=1 lo que creo que necesito, pero no funciona, el código es este:
    Código:
    <script language="javascript" type="text/javascript">
    //SCROLLING VERTICAL DE PAGINA CON DHTML
    //Iván Nieto Pérez
    //Este script y otros muchos pueden
    //descarse on-line de forma gratuita
    //en El Código: www.elcodigo.com
    
    //numero de pixels que avanza cada vez
    paso = 3
    //posicion inicial
    pos = 0
    //posicion final (para Netscape)
    NetscapeFin = 210
    //velocidad del scrolling
    velocidad = 100
    
    function scrollDHTML() {
      window.scroll(0, pos)
      pos = pos + paso
      if (document.body) {			//si IE4+
         if( pos > (document.body.scrollHeight - document.body.clientHeight) )
            pos = 0
      } else {				//en caso contrario, suponemos Netscape (no es del todo correcto)
         //alert(self.pageYOffset)		//usalo para calcular el valor de NetscapeFin
         if( pos > NetscapeFin )
            pos = 0
      }   
    
      temporizador = setTimeout("scrollDHTML()", velocidad)
    }
    
    
    
    
    </script>
    A mi no me funciona ni con explorer ni con firefox ni siquiera en el ejemplo que ponen en la página donde me descargo el código, insertado ese código en mi página sigue sin funcionar ¿a alguien se le ocurre algo?

    Saludos
    Citar  
     

  13. #13  
    Avanzado
    Fecha de ingreso
    Jun 2006
    Mensajes
    538
    Descargas
    3
    Uploads
    0
    Sin el resto del código no te se decir exactamente. Lo que parece es que en ningun momento se llama a la funcion scrollDHTML para en empieze el bucle.

    prueba a poner una linea antes de </script> la llamada scrollDHTML();. O haz la llamada a la funcion, cuando quieras que empieze el scroll. (aunque este script se refiere al scroll de la ventana, no a la rotación de frames.
    Última edición por Ktorce; 16-05-2007 a las 14:44
    Citar  
     

  14. #14  
    Moderador HH
    Fecha de ingreso
    Jun 2006
    Ubicación
    Never mind that
    Mensajes
    979
    Descargas
    6
    Uploads
    0
    Esto es lo que tengo

    Código:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    	<title>Camaras</title>
    <script language="javascript" type="text/javascript">
    
    
    //numero de pixels que avanza cada vez
    paso = 45
    //posicion inicial
    pos = 0
    //posicion final (para Netscape)
    NetscapeFin = 768
    //velocidad del scrolling
    velocidad = 10000
    
    function scrollDHTML() {
      window.scroll(0, pos)
      pos = pos + paso
      if (document.body) {			//si IE4+
         if( pos > (document.body.scrollHeight - document.body.clientHeight) )
            pos = 0
      } else {				//en caso contrario, suponemos Netscape (no es del todo correcto)
         //alert(self.pageYOffset)		//usalo para calcular el valor de NetscapeFin
         if( pos > NetscapeFin )
            pos = 0
      }   
    
      temporizador = setTimeout("scrollDHTML()", velocidad)
    }
    
    
    
    
    </script>
    
    </head>
    <body bottommargin="0" leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" topmargin="0">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
    	<td width="50%"><iframe id="ct111" name="ct111" src="http://XXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct112" name="ct112" src="http://XXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    <tr>
    	<td width="50%"><iframe id="ct125" name="ct125" src="axis2.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct119" name="ct119" src="axis.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    <tr>
    	<td width="50%"><iframe id="ct123" name="ct123" src="http://XXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct122" name="ct122" src="http://XXX"" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    <tr>
    	<td width="50%"><iframe id="ct113" name="ct113" src="http://XXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct114" name="ct114" src="http://XXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    <tr>
    	<td width="50%"><iframe id="ct115" name="ct115" src="http://XXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct116" name="ct116" src="http://XXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    <tr>
    	<td width="50%"><iframe id="ct117" name="ct117" src="http://XXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct118" name="ct118" src="http://XXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    <tr>
    	<td width="50%"><iframe id="ct120" name="ct120" src="http://XXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct121" name="ct121" src="http://XXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    <tr>
    	<td width="100%" colspan="2"><iframe id="ct124" name="ct124" src="http://XXX" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 390px;" scrolling="no" frameborder="0"></iframe></td>
    
    </tr>
    
    </table>
    <br><br><br>
    </body>
    </html>
    Necesito algo que me permita desplazar la página verticalmente una vez todas las cámaras hayan pedido la contraseña con lo cual no las vuelvo a llamar y me la vuelven a pedir sino una vez abiertas todas desplazarme en esa página con 4 saltos de tal forma que meta 4 cámaras en cada pantalla y vuelva al principio. Saludos
    Citar  
     

  15. #15  
    Moderador HH
    Fecha de ingreso
    Jun 2006
    Ubicación
    Never mind that
    Mensajes
    979
    Descargas
    6
    Uploads
    0
    He añadido lo que me decías scrollDHTML() antes de cerrar el script y funciona, voy a intentar ajustarlo, gracias Ktorce, tienes unas cañas virtuales con pincho incluido todo pagado.

    En serio, muchas gracias. Saludos
    Citar  
     

  16. #16  
    Avanzado
    Fecha de ingreso
    Jun 2006
    Mensajes
    538
    Descargas
    3
    Uploads
    0
    De nada tio.

    Tal vez te resulte mas facil, en vez de mover el scroll, meterlo dentro de divs con el stilo visibility=hidden, o display=none, no me acuerdo exactamente cual de los dos, pero de esta manera, si con el script estas siempre ocultando 3 tablas, y mostrando 1, esta siempre se mostrará al principio de la pantalla, y no necesitas mover el scroll : <div style="display:none">aquí tu tabla o lo que quieras estar ocultando</div>

    Salu2
    Citar  
     

  17. #17  
    Avanzado
    Fecha de ingreso
    Jun 2006
    Mensajes
    538
    Descargas
    3
    Uploads
    0
    Como no se si me he explicado bien... XD. Esto es lo que quería decir:

    Código:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    	<title>Camaras</title>
    <script language="javascript" type="text/javascript">
    
    pagina = 1;
    velocidad = 10000;
    
    function muestraPagina(){
    	document.getElementById("pagina"+pagina).className="divoculto";
    	if (pagina == 3) 
    		pagina=1;
    	else
    		pagina++;
    	document.getElementById("pagina"+pagina).className="divvisible";
    	setTimeout("muestraPagina()", velocidad);
    }
    </script>
    <style>
    .tabla{
    	border:none;
    	border-width:0px;
    	width:100%;
    	margin:0px;
    }
    .divoculto {
    	display: none;
    }
    .divvisible {
    	display: block;
    }
    </style>
    </head>
    <body bottommargin="0" leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" topmargin="0" onLoad="muestraPagina()">
    <div id="pagina1" class="divoculto">
    <table class="tabla">
    <tr>
    	<td width="50%"><iframe id="ct111" name="ct111" src="uno.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct112" name="ct112" src="dos.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    <tr>
    	<td width="50%"><iframe id="ct125" name="ct125" src="axis2.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct119" name="ct119" src="axis.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    <tr>
    	<td width="50%"><iframe id="ct123" name="ct123" src="tres.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct122" name="ct122" src="cuatro.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    </table>
    </div>
    <div id="pagina2" class="divoculto">
    <table class="tabla" cellpadding="0" cellspacing="0">
    <tr>
    	<td width="50%"><iframe id="ct113" name="ct113" src="cinco.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct114" name="ct114" src="seis.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    <tr>
    	<td width="50%"><iframe id="ct115" name="ct115" src="siete.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct116" name="ct116" src="ocho.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    <tr>
    	<td width="50%"><iframe id="ct117" name="ct117" src="nueve.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct118" name="ct118" src="diez.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    </table>
    </div>
    <div id="pagina3" class="divoculto">
    <table class="tabla" cellpadding="0" cellspacing="0">
    <tr>
    	<td width="50%"><iframe id="ct120" name="ct120" src="once.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    	<td width="50%"><iframe id="ct121" name="ct121" src="doce.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 290px;" scrolling="no" frameborder="0"></iframe></td>
    </tr>
    <tr>
    	<td width="100%" colspan="2"><iframe id="ct124" name="ct124" src="trece.html" marginwidth="0" marginheight="0" style="Z-INDEX: 0; VISIBILITY: visible; WIDTH: 100%; HEIGHT: 390px;" scrolling="no" frameborder="0"></iframe></td>
    
    </tr>
    
    </table>
    </div>
    </body>
    </html>
    Realmente todos los iframes se cargan al principio, por lo que solo te pedirá password al principio, aunque no se vea, y luego los va ocultando y mostrando segun toque, y no necesita de scroll.

    Voy con hambre, el pincho virtual puede ser un ñu con patatas?

    Salu2
    Última edición por Ktorce; 16-05-2007 a las 19:40
    Citar  
     

  18. #18  
    Moderador HH
    Fecha de ingreso
    Jun 2006
    Ubicación
    Never mind that
    Mensajes
    979
    Descargas
    6
    Uploads
    0
    Ktorce le tendré que decir a mi jefe que te meta en nómina, hoy no voy a probar el código este que me has dado porque es festivo aquí en Galicia y yo con los festivos soy muy respetuoso

    Me voy a la playica a ver si encuentro unos percebes y unas nécoras y ya te las paso por ftp, con el marisco no se comen patatas asi que de segundo plato te pasaré un "feira´s style octopus" como ponen los bares del centro de Santiago para los guiris o "polvo á feira" que es pulpo con patatas (cachelos).

    Si no estás de acuerdo con el menú no hay problema, si quieres ñu tendrás ñu y si quieres koala que se prepare Mofli con su aroma a eucalipto.

    Saludos
    Citar  
     

Temas similares

  1. Respuestas: 3
    Último mensaje: 01-11-2008, 19:43
  2. Como hackear red en windows utilizando linux?
    Por gery69 en el foro REDES Y TECNOLOGIAS WIRELESS
    Respuestas: 19
    Último mensaje: 28-06-2007, 13:36
  3. utilizando el radmin
    Por 40Che en el foro INTRUSION
    Respuestas: 1
    Último mensaje: 05-01-2007, 19:27
  4. como saber si alguien esta utilizando tu wifi
    Por stealth en el foro REDES Y TECNOLOGIAS WIRELESS
    Respuestas: 1
    Último mensaje: 07-11-2006, 23:02
  5. Respuestas: 8
    Último mensaje: 21-02-2004, 18:18

Marcadores

Marcadores