Hello All, I want to make sure that my website isn't placed in someone elses frame? Does anyone know how to prevent this? Thanks, Marty
<script language="javascript" type="text/javascript"> if (window != parent) parent.location.href = "http://www.locationofyoursite.com/"; </script> Code (markup):
Another way: <script language="JavaScript"> <!-- if (top != self) { if (top.location) top.location.replace(self.location.href); else top.document.location.replace(self.document.location.href); } //--> </script> Code (markup):
If your page is landing in an iframe, and you're trying to escape that iframe so that you're page fills the entire "parent" window, you can use the following javascript: if( self != top ) { top.location.replace(self.location.href); } Hope this helps!