Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Frame killer code


Message #1 by "Patel, ChetanX" <chetanx.patel@i...> on Thu, 24 May 2001 18:00:46 -0700
Try:

if(top.location!=self.location){
    top.location=self.location;
}


> I am trying to write frame killer code. Basically if anyone tries to 
frame
> my side then it should kill the frame and show the content in one page. 
Does
> any one have some code?
> 
> I have code which works fine in IE all the times. But in Netscape it is
> working sometime if there are no redirect page. Any idea? 
> 
> if (parent.frames.length)
> 			parent.location.href=self.location;
> 
> Is there any other way to write this code?
> 
> Regards,
> Chetan.
> 

  Return to Index