MartinCouture
Technical User
My extend of Javascript is at the cut and past level, so here I go :
<html>
<head>
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
function enleverframes(){
nombreframes=parent.frames.length;
if (nombreframes>0){
parent.location.href=self.location.href;
}
}
// End -->
</SCRIPT>
<title>Herc.zapto.org</title>
<meta name="GENERATOR" content="Notepad ;-D">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<frameset rows="70,*" FRAMEBORDER="no" BORDER=0>
<frame src="top.html" name="top" id="top" frameborder="0" scrolling="No" noresize marginwidth="0" marginheight="0" bordercolor="#000000" target="menu">
<frameset cols="170,*" FRAMEBORDER="no" BORDER=0>
<frame src="menu.html" name="menu" id="menu" frameborder=0 scrolling="No" noresize bordercolor="#000000" target="main">
<frame src="main.html" name="main" id="main" frameborder=0 scrolling="Auto" bordercolor="#000000" target="_self">
</frameset>
<noframes>
<body onLoad="enleverframes();">
<p>This web pages uses frames. You browser cannot display them correctly.
Please upgrade your browser</p>
<p>Cette page utilise des cadres, mais votre navigateur ne les prend pas en
charge.</p>
</body>
</noframes>
</frameset>
</html>
I would like this index.html page, which contains 3 frames, to load at the top level. Because Spaceports has a link to my site and they leave a footer containing adds, I would like this page to check to see if it is in a frame, and if it is, to load at the "_top" level...
This pages loads ok, but does not remove the frame ! The script is a cut and paste from a magazine and it looks like it makes sense, but I'm not sure where I'm supposed to put the code and the onload command is in the <BODY> part which, I think, won't be loaded unless the browser doesn't support frames.
Thanks
<html>
<head>
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
function enleverframes(){
nombreframes=parent.frames.length;
if (nombreframes>0){
parent.location.href=self.location.href;
}
}
// End -->
</SCRIPT>
<title>Herc.zapto.org</title>
<meta name="GENERATOR" content="Notepad ;-D">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<frameset rows="70,*" FRAMEBORDER="no" BORDER=0>
<frame src="top.html" name="top" id="top" frameborder="0" scrolling="No" noresize marginwidth="0" marginheight="0" bordercolor="#000000" target="menu">
<frameset cols="170,*" FRAMEBORDER="no" BORDER=0>
<frame src="menu.html" name="menu" id="menu" frameborder=0 scrolling="No" noresize bordercolor="#000000" target="main">
<frame src="main.html" name="main" id="main" frameborder=0 scrolling="Auto" bordercolor="#000000" target="_self">
</frameset>
<noframes>
<body onLoad="enleverframes();">
<p>This web pages uses frames. You browser cannot display them correctly.
Please upgrade your browser</p>
<p>Cette page utilise des cadres, mais votre navigateur ne les prend pas en
charge.</p>
</body>
</noframes>
</frameset>
</html>
I would like this index.html page, which contains 3 frames, to load at the top level. Because Spaceports has a link to my site and they leave a footer containing adds, I would like this page to check to see if it is in a frame, and if it is, to load at the "_top" level...
This pages loads ok, but does not remove the frame ! The script is a cut and paste from a magazine and it looks like it makes sense, but I'm not sure where I'm supposed to put the code and the onload command is in the <BODY> part which, I think, won't be loaded unless the browser doesn't support frames.
Thanks