
November 10th, 2000, 05:39 PM
|
|
Junior Member
|
|
Join Date: Nov 2000
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
If you define your frameset for a section of the site with the file frmset.html, you can use JavaScript to see if a page is within a frameset defined by that file. If it isnt you can then set the location to be the initial frameset document. The script here shows how this might be done. Just place it within in the <head> tag of all the framed documents.
<script>
<!--
var containingwindow = top.location.pathname.substring((top.location.pathname.lastIndexOf("/"))+1).
toLowercase();
if (containingwindow!="frmset.html")
top.location.replace("frmset.html");
//-->
</script>
This script will not work if the user has gone deep into a frameset, as the regenerated frameset will point to the initial document in the frameset.
Hope this helps
|