Home Frames Page Out Of Frame Keep Your Pages out of Other Site's Frames
Search MS Office A-Z   |   Search Web Pages/ Design A-Z

Keep Your Pages out of Other Site's Frames

You can use a JavaScript script similar to the previous one to ensure that your page never gets loaded into someone else's frame:

<script language="javascript" type="text/javascript">
<!-- Hide script from older browsers
if(top!=self)
{top.location = self.location;}
//-->
</script>

This script checks to see if the current page location is the top-most in the browser hierarchy. If not, then the script forces the page to the top level and displays it as the current page in the browser.