[thelist] breaking out of someone else's frameset

Scott Dexter sgd at ti3.com
Thu, 2 Dec 1999 19:59:20 -0600


because I actually saved responses when I asked this:

(Courtesy Rudy Limeback --I beat you to it!)
it's a, um, frequently asked question, one which, by coincidence, i once
started collecting answers for, please don't ask why, i don't even use a
script myself

here's my collection so far

  if (window != window.top)  top.location.href = location.href;

  if (window != top)  top.location.replace(document.location.href)

  if (location.href != top.location.href)  location.href = "index.html"

  if (self != top) top.location = self.location

  if (self.parent.frames.length != 0)
self.parent.location=document.location;

  if (self.parent.frames.length != 0)  self.parent.location="index.html";

  if (parent.frame.length !=0) { window.open(self.location);
window.stop(); }

please don't ask me to explain relative merits of one method over another

wouldn't mind hearing from a more skilled javascripter, though...

___________________
rudy limeback

sgd
--
think safely

> -----Original Message-----
> From: McCreath_David [mailto:McCreath_David@xmail.asd.k12.ak.us]
> Sent: Thursday, December 02, 1999 7:43 PM
> To: 'the list'
> Subject: [thelist] breaking out of someone else's frameset
> 
> 
> Does anyone know of a way to prevent someone from trapping 
> one of your pages
> in a frame? 
>