homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

keeping a _top page in a frame
any ideas

 1:47 am on Jan 25, 2001 (gmt 0)

Anybody got any ideas (java script) or some way to keep a page that has _top in a frame rather then it developing to a whole page.

We have permission from a company to do it, they just don't want the whole world to be able to frame in their site

Any thoughts???????



 12:52 pm on Jan 25, 2001 (gmt 0)

Not that I am aware of. There isn't a way to control the framed content.


 5:00 pm on Jan 25, 2001 (gmt 0)

I may be having a brainstorm on this one, but I'm not sure of exactly the situation here.

Are you saying that the site you want to frame has frame-busting javascript, but they are willing to let only you frame it?


 6:19 pm on Jan 25, 2001 (gmt 0)

I thought that it has internal links set up as Target="_top" -but don't let that stop your brainstorm on defeating frame-busting, let's hear it.


 8:26 pm on Jan 25, 2001 (gmt 0)


No - Im trying to defeat target=top by using a JS or some method...


 12:09 am on Jan 26, 2001 (gmt 0)

Naah, my brainstorm blew out with no results. When the code in a link sets target=" _top," then the top window it must be, as far as I can see.

On the true framebusting issue, my thinking was dependent on the framed site being accommodating to the framing site. As we discussed in this thread [webmasterworld.com], there's really no way to do anything like this externally, and there shouldn't be, either.

In the case of a cooperative site, I was orignally much too complicated in my thinking. A site could write their js to test for top=self OR top="permitted location", and then reload the page at the top level only if both tests fail.


 12:42 am on Jan 26, 2001 (gmt 0)

I thought this would do it - but so far it's done just the opposite:

<script language="Javascript">


<!--One step to installing this script-->

<!--1) Simply add the below to your HEAD.-->

<!--Change "framespage.htm" to name of frame you wish the page to be kept in-->

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

top.location = 'framespage.htm'





 1:10 am on Jan 26, 2001 (gmt 0)


As I understand it, if that js is on the framing page in your site, it will only run once. It won't get a second chance to run when the target="_top" link is clicked in the framed content.

And if the other site put it on their page, they'd end up giving everyone YOUR site as a frame.

If you ever figure something out, I'd love to know about it, because I have a place I could use it immediately. Right now my gut says this is a no-go.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved