Click here to get back home

How to force a page to be into a frame?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
How to force a page to be into a frame? opt_inf_env 10-08-2005
Get Chitika Premium
Posted by Richard Cornford on October 8, 2005, 3:02 pm
Please log in for more thread options


opt_inf_env@yahoo.com wrote:
> I have created a page consisting of two frames. The second
> frame is made to display "external" sites (i.e. written not
> by me, for example www.google.com). But I found that some
> "external" pages (for example www.hotmail.com ) do not
> "want" to be displayed in my frame. They take the whole
> windows. Does anybody know why?

It is javascript, along the lines of:-

<script type="text/javascript">
if(top != window){
top.location = window.location.href;
}
</script>

> Does anybody know whether this problem can be solved,

It is not a problem, it is a reality.

> i.e. whether one can
> force sites to be displayed into the fame?

There is nothing that the creator of the framing site can do to prevent
any page loaded into a frame from re-loading itself in the main window.

If your users don't want this to happen they can disable scripting in
their browsers.

Richard.



Posted by Dan on October 9, 2005, 2:32 pm
Please log in for more thread options


opt_inf_env@yahoo.com wrote:
> Hello everybody,
>
> I have created a page consisting of two frames. The second frame is
> made to display "external" sites (i.e. written not by me, for
> example www.google.com). But I found that some "external" pages
> (for example www.hotmail.com ) do not "want" to be displayed in my
> frame. They take the whole windows. Does anybody know why? Does anybody
> know whether this problem can be solved, i.e. whether one can force
> sites to be displayed into the fame?

Force doesn't work on the Web.
http://webtips.dan.info/force.html

It sounds like you're trying to get into a war of "dueling scripts",
where your site tries to force somebody else's site into a frame, while
the other site tries to force itself out of your frame. The wishes of
the end user don't figure into this at any point, and his browser may
end up in convulsions as it tries to execute the conflicting scripts of
both sites, unless he has some sense and disables scripting to prevent
it. Most likely he ends up going away from both of your sites.

--
Dan


Similar ThreadsPosted
Force justification of inline frame contents April 6, 2005, 12:02 am
Force Page-break when printing February 2, 2006, 11:44 am
how to force page down to see AJAX return info? May 5, 2008, 9:56 am
Link in a one frame change content of another frame. October 7, 2005, 1:30 pm
Is a "ZIP" extension the ONLY way to force a "SAVE AS" for your PDF? August 10, 2004, 1:43 pm
Force CSS on external site? December 13, 2004, 6:00 pm
force download of a file February 3, 2006, 2:43 pm
force larger image into same February 21, 2008, 3:59 am
force users to different pages? March 21, 2008, 4:58 am
How do annoying web sites force you to click on them? July 15, 2007, 12:32 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap