• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 164
  • Last Modified:

How to make HTML frames go away when leaving the site

I have a cooworker that is making a simple webpage that has two frames. I don't use frames EVER since they are messy, but he is using front page to create his html and it seems like the easiest solution for him. The top frame is a menu and the bottom frame changes depending on the menu item choosen.

How do I make it so that when the user leaves the site, the frames disappear?
How do I make so that the frames disappear on this site, when the user goes to a certain page?

Thanks in advance
0
bbcac
Asked:
bbcac
2 Solutions
 
ljubiccicaCommented:
1. via link: <a href="SamePageURL.html" target="_top">Click here</a>

2.
<head>
<script language="JavaScript" type="text/javascript">
<!--
function breakout_of_frame()
{
  // see http://www.thesitewizard.com/archive/framebreak.shtml
  // for an explanation of this script and how to use it on your
  // own website
  if (top.location != location) {
    top.location.href = document.location.href ;
  }
}
-->
</script>
</head>

as it says above:
see http://www.thesitewizard.com/archive/framebreak.shtml
for an explanation of this script and how to use it on your
own website
0
 
Michel PlungjanIT ExpertCommented:


Alternatively have
<base target="_top" />
in the head of the content page and have
target="_self"  on the links that need to stay in the frame
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now