Samrc Posted October 20, 2005 Share Posted October 20, 2005 I have seen and in the past used a script that limits access on a content page that should only appear within an iframe. Can't find it now. Looking for a redirect script that detects the page is not being viewed from with the iframe and redirects user to the page with the iframe on it. Thanks for any suggestions Quote Link to comment Share on other sites More sharing options...
newhorizonz Posted October 20, 2005 Share Posted October 20, 2005 I have seen and in the past used a script that limits access on a content page that should only appear within an iframe. Can't find it now. Looking for a redirect script that detects the page is not being viewed from with the iframe and redirects user to the page with the iframe on it. Thanks for any suggestions Have a look here: http://www.design-ireland.net/index.php?ht...n/design-10.php Quote Link to comment Share on other sites More sharing options...
Samrc Posted October 20, 2005 Author Share Posted October 20, 2005 (edited) Thanks for the link. Will take a look at the script to see the differences. Since last posting, I finally found the script I was trying to locate that I had used quite a while ago. If you try to go to the content page without the frameset around it (direct link to the page), you are redirected. Don't know who wrote the script, never did. Each content page needs these lines of code: <script type="text/javascript" src="iframe.js"> <body onload="detect();"> Then I upload a file called iframe.js to the website, into the same directory as the iframe. This file sends the visitor to the home page (index.html) for the directory since that's the page with the iframe on it. function detect() { var framesetpage = "index.html" if (parent.location.href == window.location.href) parent.location.href = framesetpage} Edited October 20, 2005 by Samrc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.