Foros del Web » Creando para Internet » HTML »

Iframes con hiperlinks

Estas en el tema de Iframes con hiperlinks en el foro de HTML en Foros del Web. Hola amigos vereis tengo un pequeño problema tengo una pagina html básica en la que tengo un boton y dos iframes, la idea que tengo ...
  #1 (permalink)  
Antiguo 09/02/2012, 09:22
 
Fecha de Ingreso: julio-2011
Mensajes: 30
Antigüedad: 12 años, 9 meses
Puntos: 0
Iframes con hiperlinks

Hola amigos vereis tengo un pequeño problema tengo una pagina html básica en la que tengo un boton y dos iframes, la idea que tengo es que cuando le de a ese boton se muestre en los dos iframes lo mismo y estoy usando este codigo

Código HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Serif )">
<meta http-equiv='X-UA-Compatible' content='IE=EmulateIE8' ><title>Home</title>
<style type="text/css">
body {margin: 0px; padding: 0px;}
.Body-C
{
    font-family:"Verdana", sans-serif; font-size:16.0px; line-height:1.13em;
}
</style>
<link rel="stylesheet" href="wpscripts/wpstyles.css" type="text/css">
<script type="text/javascript" src="wpscripts/jsWPFrame.js"></script>
</head>
<body text="#000000" style="background-color:#ffffff; text-align:center; height:1000px;">
<div style="background-color:transparent;text-align:left;margin-left:auto;margin-right:auto;position:relative;width:750px;height:1000px;">
<iframe id="ifrm_2" name="ifrm_2" src="page2.html" allowtransparency="true" style="position:absolute;left:160px;top:394px;width:432px;height:370px;">Home</iframe>
<script type="text/javascript">GetFrameUrl('ifrm_2');</script>
<div id="txt_2" style="position:absolute;left:35px;top:115px;width:166px;height:138px;overflow:hidden;">
<p class="Wp-Body-P"><span class="Body-C"><a href="page3.html"  target="ifrm_2" target="ifrm_4" style="text-decoration:underline;">5887</a></span></p>
</div>
<iframe id="ifrm_4" name="ifrm_4" src="page2.html" allowtransparency="true" style="position:absolute;left:290px;top:36px;width:396px;height:338px;">Home</iframe>
<script type="text/javascript">GetFrameUrl('ifrm_4');</script>
</div>
</body>
</html> 
como veis tengo un texto que son unos numero y lo que quiero es que cuando presione se muestren en los dos iframes lo mismo, lo he conseguido hacer pero solo en uno de ellos es decir le doy y en el iframe 2 si que sale pero quiero que tambien se muestre en el iframe 4.

Gracias
  #2 (permalink)  
Antiguo 09/02/2012, 11:16
Avatar de emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 9 meses
Puntos: 1567
Respuesta: Iframes con hiperlinks

Ahi estás usando una función GetFrameUrl(), pero no se sabe que hace.
Si los iframes a cargar son 2, podés arreglater con esto

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>XHTML 1.0 transitional</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <meta name="description" content="x" />
  7. <meta name="keywords" content="x" />
  8. <meta http-equiv="Content-Language" content="ES" />
  9. <meta http-equiv="Content-Style-Type" content="text/css" />
  10. <meta http-equiv="Content-Script-Type" content="text/javascript" />
  11. <meta http-equiv="imagetoolbar" content="no" />
  12. <meta name="copyright" content="&copy; 2006, Guillermo Gianello" xml:lang="es" lang="es" />
  13. <meta name="author" content="http://emprear.com"  xml:lang="es" lang="es" />
  14. </head>
  15. <p><a href="1.html"target="I1" onclick="parent.frames['I2'].location.href='2.html';return true">
  16. cargar 2 frames</a></p>
  17.  
  18. <p><br />Primer iframe</p>
  19. <iframe name="I1" width="300" height="300"></iframe>
  20. <p><br />Segundo iframe</p>
  21. <iframe name="I2" width="300" height="300"></iframe>
  22. </body>
  23. </html>

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

Etiquetas: css, iframe, link, botones
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 04:02.