hoganlia
08-30-2003, 05:32 PM
First of all I must state that I know NOTHING about javascript aprt from the end effects. I am desgning my first web with FrontPage 2002 and have (nearly) everything Ok. My web cinsists of a header and 6 body pages. On a few of those body pages there are lists of URLs and my problem is that with some of them, they open outside the frame. I have been given 2 javascripts to use and have tried to insert them where I thought I was being directed. The result is that the javascript turns up as a text on the wysiwyg page.
Following are the 2 scripts and my initial script. I would appreciate help as to where to place them exactly and how to activate them.
Thanks.
(starting with MY script).. ah, ignore Spanish, my FP is Spanish.
<html>
<head>
<meta http-equiv="Content-Language" content="ca">
<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>Pagina nueva 1</title>
<base target="principal">
</head>
<body background="images/Adv%202.gif">
<p align="center"><font face="BrushScript BT" size="6">
<a name="Activities for advanced levels">Activities for advanced
levels</a></font></p>
The scripts I was given are: 1) In the "head" section, but I don't know where...
<script language="Javascript">
if (self == top){top.location.href="http://www.yoursite/yourframepage.htm"}
</script>
and 2) after "BODY" flag, and they say "before any other text."
<SCRIPT LANGUAGE="javascript">
if (self==parent)
{
document.write('<b>THIS IS A FRAME ELEMENT</B>')
document.write('You will be transported to frames in a second')
document.write('<META HTTP-EQUIV="refresh" CONTENT="1; URL=framepage.html">')
}
</SCRIPT>
Thanks
Following are the 2 scripts and my initial script. I would appreciate help as to where to place them exactly and how to activate them.
Thanks.
(starting with MY script).. ah, ignore Spanish, my FP is Spanish.
<html>
<head>
<meta http-equiv="Content-Language" content="ca">
<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>Pagina nueva 1</title>
<base target="principal">
</head>
<body background="images/Adv%202.gif">
<p align="center"><font face="BrushScript BT" size="6">
<a name="Activities for advanced levels">Activities for advanced
levels</a></font></p>
The scripts I was given are: 1) In the "head" section, but I don't know where...
<script language="Javascript">
if (self == top){top.location.href="http://www.yoursite/yourframepage.htm"}
</script>
and 2) after "BODY" flag, and they say "before any other text."
<SCRIPT LANGUAGE="javascript">
if (self==parent)
{
document.write('<b>THIS IS A FRAME ELEMENT</B>')
document.write('You will be transported to frames in a second')
document.write('<META HTTP-EQUIV="refresh" CONTENT="1; URL=framepage.html">')
}
</SCRIPT>
Thanks