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.<br /><br />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. <br /><br />Thanks for any suggestions <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" /><!--content-->
<!--quoteo(post=152779:date=Oct 20 2005, 12:54 PM:name=Samrc)--><div class='quotetop'>QUOTE(Samrc @ Oct 20 2005, 12:54 PM) <a href="http://www.totalchoicehosting.com/forums/index.php?act=findpost&pid=152779"><img src='http://www.totalchoicehosting.com/forums/style_images/1/post_snapback.gif' alt='*' border='0' /></a></div><div class='quotemain'><!--quotec-->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.<br /><br />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. <br /><br />Thanks for any suggestions <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" /><!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />Have a look here:<br /><br /><a href="http://www.design-ireland.net/index.php?http%3A//www.design-ireland.net/design/design-10.php" target="_blank">http://www.design-ireland.net/index.php?ht...n/design-10.php</a><!--content-->
Thanks for the link. Will take a look at the script to see the differences.<br /><br />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. <br /><br /><br />Each content page needs these lines of code:<br /><script type="text/javascript" src=http://www.totalchoicehosting.com/forums/lofiversion/index.php/"iframe.js"><br /><body onload="detect();"><br /><br />Then I upload a file called <b>iframe.js </b>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.<br /><br />function detect() <br />{ var framesetpage = "index.html" <br /> if (parent.location.href =http://www.totalchoicehosting.com/forums/lofiversion/index.php/= window.location.href) <br /> parent.location.href = <!-- m --><a class="postlink" href="http://www.totalchoicehosting.com/forums/lofiversion/index.php/framesetpage">http://www.totalchoicehosting.com/forum ... amesetpage</a><!-- m -->}<!--content-->
<!--quoteo(post=152779:date=Oct 20 2005, 12:54 PM:name=Samrc)--><div class='quotetop'>QUOTE(Samrc @ Oct 20 2005, 12:54 PM) <a href="http://www.totalchoicehosting.com/forums/index.php?act=findpost&pid=152779"><img src='http://www.totalchoicehosting.com/forums/style_images/1/post_snapback.gif' alt='*' border='0' /></a></div><div class='quotemain'><!--quotec-->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.<br /><br />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. <br /><br />Thanks for any suggestions <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" /><!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />Have a look here:<br /><br /><a href="http://www.design-ireland.net/index.php?http%3A//www.design-ireland.net/design/design-10.php" target="_blank">http://www.design-ireland.net/index.php?ht...n/design-10.php</a><!--content-->
Thanks for the link. Will take a look at the script to see the differences.<br /><br />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. <br /><br /><br />Each content page needs these lines of code:<br /><script type="text/javascript" src=http://www.totalchoicehosting.com/forums/lofiversion/index.php/"iframe.js"><br /><body onload="detect();"><br /><br />Then I upload a file called <b>iframe.js </b>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.<br /><br />function detect() <br />{ var framesetpage = "index.html" <br /> if (parent.location.href =http://www.totalchoicehosting.com/forums/lofiversion/index.php/= window.location.href) <br /> parent.location.href = <!-- m --><a class="postlink" href="http://www.totalchoicehosting.com/forums/lofiversion/index.php/framesetpage">http://www.totalchoicehosting.com/forum ... amesetpage</a><!-- m -->}<!--content-->