containing pages from other domains within iframes

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
uscresearch1
Forum Newbie
Posts: 1
Joined: Mon Feb 27, 2006 2:19 pm

containing pages from other domains within iframes

Post by uscresearch1 »

Many urls have the script "target=_top" or "target=_blank" which prevents them from being contained inside frames/iframes. This script causes many pages to break out of frames within a page. I want to contain pages from any domain in a frame or an iframe in one of the pages on my site. I am trying to figure out a solution using client side scripting (javascript or any other html element). I am looking for a solution that is independant of any server side function. It is easy to strip out the target=_top and similar attributed from the server side, but I want this on the client side. For example, if I show http://www.yahoo.com in a frame in my site, when I click on the “sign in” to check my yahoo email, it breaks out of the frame on my site… that is what I would like to prevent from happening. Does anyone have a solution to this?
I have been able to contain these pages in IE using object element, but this doesnt work in Netscape and Firefox, and is not a smart solution.
I am looking for any solution... doesn't have to be javascript, but a way to contain the pages (without using the server/proxies). Anyone have any ideas?
Thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Moved to Client Side. :?
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

Grab the data via xmlhttprequest/xmlhttp.
String replace target="_top" || target="_blank" with target="_self".
Print string.
Post Reply