Ver Mensaje Individual
  #5 (permalink)  
Antiguo 13/04/2012, 13:07
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: (SUPER-IFRAME) ¿iframe con barra de direcciones y con hotmail.com por defe

Cita:
Iniciado por Etherman Ver Mensaje
Queridos compañeros del foro, quisiera preguntaros si existe algún código con el que se pueda implementar un iframe, con una barra de direcciones, de tal manera que se pueda navegar desde él sin salir de la página. Como añadido quiero que tenga como página por defecto, o de inicio, la de hotmail.com. He intentado meter hotmail.com con sesión iniciada, en un iframe, pero no resulta.
Cualquier info se agradece, en principio quiero que sea 100% compatibles con chrome, opera y firefox

Un saludo.
Hotmail, Google. etc, imponen medidas de seguridad para prevenir la carga de dichas páginas en un iframe. De por sí pueden ser interpretadas como intentos de pishing.

Por supuesto siempre podrías hacer algo asi, pero el uso que puedas darle queda bajo tu responsabilidad

redir.html
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>página externa</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6.  
  7. <style type="text/css">
  8. /*<![CDATA[*/
  9.  
  10. html, body, frameset, frame{
  11. border: 0; padding: 0; margin-top: -2px;
  12. height: 100%;
  13. }
  14.  
  15. /*]]>*/
  16. </head>
  17.   <frameset rows="35px, *">
  18.      <frame name="arriba" src="arriba.html" scrolling="no" noresize="noresize" frameborder="0" id="arriba" />
  19.      <frame name="abajo" src="http://forosdelweb.com" scrolling="auto"  noresize="noresize" frameborder="0" id="abajo" />
  20.   <noframes>
  21. <p>Su navegador no soporta marcos</p>
  22. </body>
  23.   </noframes>
  24. </frameset>
  25. </html>

arriba.html
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2.    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es" >
  4. <title>página externa</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <script type="text/javascript">
  7. //<![CDATA[
  8.  
  9. if (self.location == top.location)
  10. top.location.href = 'redir.html';
  11.  
  12. function ir_a(){
  13. var destino = document.getElementById('urlx').value;
  14. top.frames['abajo'].location.href = destino;
  15. }
  16. //]]>
  17. </head>
  18.  
  19. <a href="javascript:parent.document.body.rows='0,*'">cerrar este marco</a>  |
  20. <a href="#" onclick="window.parent.location.href='http://forosdelweb.com'">url original</a>
  21. <form action="#" style="float: left;">
  22. <input type="text" id="urlx" value="" /><input type="button" value="ir" onclick="ir_a();"/></form>
  23. </body>
  24. </html>

abajo.html
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2.    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es" >
  4. <title>página externa</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. </head>
  7. <p>
  8. <!-- fix -->
  9. </p>
  10. </body>
  11. </html>

Por lo de usar frames, si son obsoletos, seo y demás, son una herramienta, si te sirven, usalos

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.