Tema: help
Ver Mensaje Individual
  #5 (permalink)  
Antiguo 23/08/2003, 15:09
Avatar de tunait
tunait
Moderadora
 
Fecha de Ingreso: agosto-2001
Ubicación: Terok Nor
Mensajes: 16.805
Antigüedad: 22 años, 8 meses
Puntos: 381
Es facil, tiene la misma estructura que la del ejemplo

mira, en tu página index.htm debes poner esto en el código fuente en head

<script language="JavaScript">
var red = true
</script>

de forma que te quede así
Cita:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>.::Grupo de Acción Forestal::.</title>
<script language="JavaScript">
var red = true
</script>
</head>
Luego a tus páginas arriba.htm y izqu.htm debes ponerle esto en head

<script language="JavaScript">
//Evitar páginas fuera de su frame

if(top==self) top.location="index.htm"
</script>

de forma que te quede algo así

Cita:
en arriba.htm:
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>www</title>
<base target="contenido">
<script language="JavaScript">
//Evitar páginas fuera de su frame

if(top==self) top.location="index.htm"
</script>
</head>




y en izqu.htm:

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Inicio</title>
<base target="principal">
<style>
<!--
TD {
FONT-FAMILY: Verdana, Arial, Helvetica; FONT-SIZE: 11px
}
-->
</style>
<script language="JavaScript">
//Evitar páginas fuera de su frame

if(top==self) top.location="index.htm"
</script>
</head>
A la página de nombre centro.htm le pones esto:

<script language="JavaScript">
//Evitar páginas fuera de su frame
//http://javascript.tunait.com/
if(top==self) top.location="index.htm"
if(top.location.search.substr(1) != "" && top.red == true)
{
top.red = false
location.href = top.location.search.substr(1)
}

</script>

de forma que te quede algo así

Cita:
<head>
<meta http-equiv="Content-Language" content="es-mx">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Grupo de Acción Forestal </title>
<base target="_self">

<script language="JavaScript">
//Evitar páginas fuera de su frame
//http://javascript.tunait.com/
if(top==self) top.location="index.htm"
if(top.location.search.substr(1) != "" && top.red == true)
{
top.red = false
location.href = top.location.search.substr(1)
}

</script>
</head>
Finalmente al resto de páginas que hayan de cargarse en el frame principal (ejemplo: socios.htm, afiliacion.htm, noticias.htm etc.), es decir, todas las que deban cargarse en el frame principal (excepto centro.htm que yá lleva otro código) debes poner esto

<script language="javascript">
url=this.location.pathname
if(top==self) top.location="index.htm?" + url
</script>

de forma que te quede algo así

Cita:
<head>
<meta http-equiv="Content-Language" content="es-mx">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Página nueva 0</title>
<style>
<html> <body>
table.MsoNormalTable
{mso-style-parent:"";
font-size:10.0pt;
font-family:"Times New Roman"}
p.MsoNormal
{mso-style-parent:"";
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:Arial;
margin-left:0cm; margin-right:0cm; margin-top:0cm}
p.MsoHeader
{margin-bottom:.0001pt;
tab-stops:center 212.6pt right 425.2pt;
font-size:10.0pt;
font-family:Arial;
margin-left:0cm; margin-right:0cm; margin-top:0cm}
h2
{margin-bottom:.0001pt;
text-align:justify;
line-height:150%;
page-break-after:avoid;
font-size:12.0pt;
font-family:Arial;
font-weight:normal; margin-left:0cm; margin-right:0cm; margin-top:0cm}
h1
{margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:20.25pt;
margin-bottom:.0001pt;
text-align:right;
page-break-after:avoid;
font-size:10.0pt;
font-family:Arial;
font-style:italic}
h3
{margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:354.0pt;
margin-bottom:.0001pt;
text-indent:35.4pt;
page-break-after:avoid;
font-size:12.0pt;
font-family:"Times New Roman";
}
table.MsoNormalTable
{mso-style-parent:"";
font-size:10.0pt;
font-family:"Times New Roman"}
INPUT {
BORDER-BOTTOM-COLOR: #000000; BORDER-LEFT-COLOR: #000000; BORDER-RIGHT-COLOR: #000000; BORDER-TOP-COLOR: #000000; COLOR: #000000; FONT-SIZE: 14px; FONT-STYLE: normal; FONT-VARIANT: normal; FONT-WEIGHT: normal; LINE-HEIGHT: normal
}
INPUT {
TEXT-INDENT: 2px
}
INPUT.post {

}
-->
</style>
<base target="_self">

<script language="javascript">
url=this.location.pathname
if(top==self) top.location="index.htm?" + url
</script>

</head>


NOTA: lo que te marqué en negritas en esto último

<html> <body>

Está de más en tu código, deberías quitarlo