Categories:

Home / Free JavaScripts / Windows, remotes, frames / Here

Cut & Paste Keep-in-frames script

Credit: JavaScript Kit

Description: If your site uses a frames setup, you probably do not want the containing pages to be accessed individually. This script ensures they are not. When put inside the page(s) in question, the script checks to see if it's inside a frame, and redirects users to the main frame page (so the page is viewed inside the frames context) if not.

Example: n/a

Directions: Just add the below code to the <HEAD> section of ALL the page(s) you wish to ensure are viewed only inside your frames setup:

Be sure to change "index.htm" inside the script to the URL of your main frames page (ie: http://www.mydomain.com/index.shtml).


JavaScript Tools:
Site Info


CopyRight (c) 2018 JavaScript Kit. NO PART may be reproduced without author's permission. Contact Info