Foros del Web » Creando para Internet » Herramientas y Software »

link a ancla en iframe de página externa

Estas en el tema de link a ancla en iframe de página externa en el foro de Herramientas y Software en Foros del Web. hola a todos! tengo un enlace en una página html que va a un ancla situada en un texto dentro de un iframe en otra ...
  #1 (permalink)  
Antiguo 23/04/2004, 01:12
 
Fecha de Ingreso: diciembre-2002
Mensajes: 102
Antigüedad: 21 años, 4 meses
Puntos: 0
link a ancla en iframe de página externa

hola a todos!
tengo un enlace en una página html que va a un ancla situada en un texto dentro de un iframe en otra página html. parece un trabalenguas , pero es así. esquema:

pag 1.html
link> pag 2.html
iframe (CONT)
ancla "noticias"

lo que pongo en el link es: 2.html#noticias, pero claro, esto sería si el ancla estuviera en la página en sí y no en un iframe. cómo dirijo el enlace al ancla que está dentro del iframe al que he nombrado CONT ?
por favor, alguien pude echarme una mano?
muchas gracias por adelantado
  #2 (permalink)  
Antiguo 23/04/2004, 03:35
Avatar de adasilva  
Fecha de Ingreso: abril-2004
Ubicación: madrid
Mensajes: 10
Antigüedad: 20 años
Puntos: 0
Iframe

No entiendo que no te funcione, mi pagina está hecha así y funciona perfectemente.

compruebalo.

Alberto Da Silva
webmaster
http://www.adasilva.com
  #3 (permalink)  
Antiguo 23/04/2004, 03:45
Avatar de adasilva  
Fecha de Ingreso: abril-2004
Ubicación: madrid
Mensajes: 10
Antigüedad: 20 años
Puntos: 0
link iframe

un ejemplo:

<a href://www.adasilva.com/ejemplo/2.htm#ancla target="noticias">ir a noticias</a>

donde "ancla" seria el nombre del ancla

y target el nombre de tu iframe
  #4 (permalink)  
Antiguo 03/05/2004, 06:01
 
Fecha de Ingreso: diciembre-2002
Mensajes: 102
Antigüedad: 21 años, 4 meses
Puntos: 0
hola
pues no me sirve.
lo que yo pretendo es ir a un ancla que está colocada en un iframe de otra pagina html. con lo que tú me has pasado, el target sigue estando en la pagina inicial.
lo explico de nuevo:
yo estoy en 1.html, en un iframe que se llama CONT. tengo un enlace que quiero que me dirija a otro iframe que se llama CONT_noticias y que está alojado en 2.html.
esto es lo que pongo en el enlace:
<a href="2.html#vacaciones" target="CONT_noticias">leer</a>
funcionar, funciona. el problema es que siempre me lleva al borde superior del iframe CONT_noticias, cuando lo quiero es que vaya a un ancla determinada, por ejemplo, vacaciones, que está como a la mitad del iframe.

a alguien se le ocurre algo?

muchas gracias!
  #5 (permalink)  
Antiguo 03/05/2004, 09:09
Avatar de adasilva  
Fecha de Ingreso: abril-2004
Ubicación: madrid
Mensajes: 10
Antigüedad: 20 años
Puntos: 0
Tienes todo bien, tiene que funcionar.
En la parte superior del iframe se te habre el sitio donde tienes el ancla.
Haz una prueba....es solo copiar y pegar, guardalos en el mismo directorio.


default.htm:

<html>
<head>
<title>prueba</title>
</head>
<body>
<a href="noticias.html#vacaciones" target="noticias">leer</a>
<table border="1">
<td align="center" valign="top" width="600" height="350">
<iframe name="noticias" width="100%" height="100%" frameborder="no" marginwidth=0 marginheight=0 scrolling="no" src="noticias.html" allowtransparency="true">
</iframe></td>
</table>
</body>
</html>

noticias.html:

<html>
<head>
<title> noticias </title>
</head>
<body style="background-color: transparent;">
<table align="CENTER">
<a name="arriba"><FONT FACE="MODERN" SIZE="5" COLOR="#CC9900"><B><center>ENLAZA NUESTRA WEB</center></B></FONT></a><br>
<tr><td ALIGN=CENTER><a href="http://www.adasilva.com" target="_blank"><img src="http://www.adasilva.com/enlaces/portal1.gif" width="468" height="60" border="0" alt="WWW.ADASILVA.COM"></a></td>
</tr><br>
<tr><td ALIGN="CENTER"><textarea name="enlace" rows="5" cols="56"><a href="http://www.adasilva.com" target="_blank">
<img src="http://www.adasilva.com/enlaces/portal1.gif" width="468" height="60" border="0" alt="portal adasilva">
</a></textarea><p><br></td>
</tr>
<tr>
<td ALIGN="CENTER">
<a name="vacaciones">
<iframe ALIGN="CENTER" width="600" height="300" frameborder="no" marginwidth=0 marginheight=0 scrolling="no" src="http://www.adasilva.com/BUSCANOT/buscador.html" allowtransparency="true"></iframe>
<p><br></td>
</tr>
</table>
</body>
</html>
  #6 (permalink)  
Antiguo 04/05/2004, 01:09
 
Fecha de Ingreso: diciembre-2002
Mensajes: 102
Antigüedad: 21 años, 4 meses
Puntos: 0
pues lo siento, amigo adasilva, pero a mí no se me va al ancla en cuestión. ojo, no sé si te has fijado que no quiero que se me abra la página del ancla en el mismo iframe en el que estoy, sino en uno alojado en otra pagina html.
gracias
  #7 (permalink)  
Antiguo 04/05/2004, 08:32
Avatar de adasilva  
Fecha de Ingreso: abril-2004
Ubicación: madrid
Mensajes: 10
Antigüedad: 20 años
Puntos: 0
Si quieres que se te habra por un ancla directamente, Default.htm seria esto:

<html>
<head>
<title>prueba</title>
</head>
<body>
<table border="1">
<td align="center" valign="top" width="600" height="350">
<iframe name="noticias" width="100%" height="100%" frameborder="no" marginwidth=0 marginheight=0 scrolling="no" src="noticias.html#vacaciones" allowtransparency="true">
</iframe></td>
</table>
</body>
</html>

....y ya está.
  #8 (permalink)  
Antiguo 04/05/2004, 08:42
Avatar de adasilva  
Fecha de Ingreso: abril-2004
Ubicación: madrid
Mensajes: 10
Antigüedad: 20 años
Puntos: 0
...y así hasta que tu quieras:

prueba.htm y añade a default.htm un ancla donde tu quieras que se llame noticias

<html>
<head>
<title>prueba</title>
</head>
<body>
<table border="2">
<td align="center" valign="top" width="750" height="550">
<iframe name="noticias" width="100%" height="100%" frameborder="no" marginwidth=0 marginheight=0 scrolling="no" src="default.htm#noticias" allowtransparency="true">
</iframe></td>
</table>
</body>
</html>


y así un ancla abre otro en otra página diferente....
  #9 (permalink)  
Antiguo 15/12/2004, 22:05
 
Fecha de Ingreso: enero-2002
Ubicación: Buenos Aires
Mensajes: 47
Antigüedad: 22 años, 3 meses
Puntos: 0
Y? Como lo solucionaste?

Hola. Quisiera saber por favor como solucionaste el tema porque estoy necesitando justo eso.
Desde ya muchas gracias.
Saludos,

Redmax
__________________
Redmax
  #10 (permalink)  
Antiguo 30/11/2011, 15:11
Avatar de nublar
(Desactivado)
 
Fecha de Ingreso: octubre-2003
Ubicación: Argentina - BsAs
Mensajes: 321
Antigüedad: 20 años, 6 meses
Puntos: 0
Respuesta: link a ancla en iframe de página externa

El ejemplo de ADASILVA funciona perfectamente.

Cita:
default.htm:

<html>
<head>
<title>prueba</title>
</head>
<body>
<a href="noticias.html#vacaciones" target="noticias">leer</a>
<table border="1">
<td align="center" valign="top" width="600" height="350">
<iframe name="noticias" width="100%" height="100%" frameborder="no" marginwidth=0 marginheight=0 scrolling="no" src="noticias.html" allowtransparency="true">
</iframe></td>
</table>
</body>
</html>

noticias.html:

<html>
<head>
<title> noticias </title>
</head>
<body style="background-color: transparent;">
<table align="CENTER">
<a name="arriba"><FONT FACE="MODERN" SIZE="5" COLOR="#CC9900"><B><center>ENLAZA NUESTRA WEB</center></B></FONT></a><br>
<tr><td ALIGN=CENTER><a href="http://www.adasilva.com" target="_blank"><img src="http://www.adasilva.com/enlaces/portal1.gif" width="468" height="60" border="0" alt="WWW.ADASILVA.COM"></a></td>
</tr><br>
<tr><td ALIGN="CENTER"><textarea name="enlace" rows="5" cols="56"><a href="http://www.adasilva.com" target="_blank">
<img src="http://www.adasilva.com/enlaces/portal1.gif" width="468" height="60" border="0" alt="portal adasilva">
</a></textarea><p><br></td>
</tr>
<tr>
<td ALIGN="CENTER">
<a name="vacaciones">
<iframe ALIGN="CENTER" width="600" height="300" frameborder="no" marginwidth=0 marginheight=0 scrolling="no" src="http://www.adasilva.com/BUSCANOT/buscador.html" allowtransparency="true"></iframe>
<p><br></td>
</tr>
</table>
</body>
</html>

Me sirvio de mucho!!

Gracias!!!!!
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.
Tema Cerrado




La zona horaria es GMT -6. Ahora son las 23:56.