Hola, busco una solución, tengo una pagina que contiene dos iframes llamados "A" y "B" respectivamente, bien en el "A" carga un menu de 4 botones y en "B" una pagina que es muy larga por lo tanto esta divida en 4 secciones (las secciones son 1,2,3,4) bueno lo que pretendo es ir a un ancla que esta en la seccion 3 de la pagina que esta en "B" al activar o hacer clic en el primer boton del menu que esta en "A", bueno espero haberme dado a entender si alguien me puede ayudar se lo agradezco mucho un saludo y GRACIAS.
Bien aqui pongo el codigo de la pagina que aparece en el iframe "A" y la que aparece en el iframe "B" para que me entiendan mejor y vean lo que he hecho:
Esto esta en "A" es el menu de 4 Botones
esto esta en "B" es la pagina que tiene las 4 seccionesCódigo:<html> <head> <title>MENU</title> </head> <body bgcolor="#D8D8BF"> <script language="JavaScript"> function btn01() { var s1; s1 = "file://" + parent.frames[0].location.pathname + "#00" parent.A.location.href = s1; } function btn02() { var s2; s2 = "file://" + parent.frames[0].location.pathname + "#01" parent.A.location.href = s2; } function btn03() { var s3; s3 = "file://" + parent.frames[0].location.pathname + "#02" parent.A.location.href = s3; } function btn04() { var s4; s4 = "file://" + parent.frames[0].location.pathname + "#03" parent.A.location.href = s4; } </script> <table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=1 WIDTH="100%"> <tr> <td>[img]esp1.gif[/img]</td> </tr> <tr> <td>[img]esp1.gif[/img]</td> </tr> <tr> <td>[img]esp1.gif[/img]</td> </tr> <tr> <td>[img]esp1.gif[/img]</td> </tr> </table> </body> </html>
Bien como se daran cuenta en la pagina que aparece en "B" aparece una funcion de javascript:Código:<html> <head> <title>SECCIONES</title> </head> <body bgcolor="#FFFFFF" onload="parent.A.location.href='menuespecial.htm'; return true"> <TABLE BORDER CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%"> <TR> <TD VALIGN="baseline" WIDTH="80%"> <CENTER> <h2>COLORES ESPECIALES I </h2> </CENTER> </TD> </TR> <TR> <TD WIDTH="80%" BGCOLOR="#8C7853"> <A NAME="00"></A> <H3><font size=+2>SECCION 1</font></H3> </TD> </TR> <TR> <TD WIDTH="80%" BGCOLOR="#FF7F00"> <A NAME="00"></A> <H3><font size=+2>SECCION 2</font></H3> </TD> </TR> <TR> <TD WIDTH="80%" BGCOLOR="#856363"> <A NAME="00"></A> <H3><font size=+2>SECCION 3</font></H3> </TD> </TR><TR> <TD WIDTH="80%" BGCOLOR="#CD7F32"> <A NAME="00"></A> <H3><font size=+2>SECCION 4</font></H3> </TD> </TR> </table> </body> </html>
esta es la que hace que cargue el menu en el iframe "A" bueno no se si el problema este en el script del menu segun este sirve para hacer este tipo de anclaje pero a mi no me funciona, comentarios sugerencias y soluciones seran bien recibidos.Código:<body bgcolor="#FFFFFF" onload="parent.A.location.href='MENU.htm'; return true">



Citar



Marcadores