View Full Version : Preventing page from rendering in a frame

08-18-2005, 05:37 PM
Is there a way to add something to the body element so that you web page will not show up in someone else's frame. Another example someone makes a web page with frames and one of the frames links to your web site, but you do not want you page to show up in their frame rather a new window?

08-18-2005, 05:59 PM
It's not 100% foolproof but it's normally called a frame-breaker:

if(top.location != document.location) {

hope this helps


08-18-2005, 09:29 PM
Excatly what I was looking for thanks a lot. It works perfect for what I need!!!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum