473,766 Members | 2,026 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

changing _parent targets to _self on remote page

Rob
Hi Gang:

I have a page that loads a remote page into an IFRAME.
I don't have any control over this remote page though the page is owned by
the same company I work for.

The problem is that all of the pages have <base target='_parent '> specified
-- so every link will bust out of the IFRAME.

One solution I thought of was to load the page via a server side language,
then run through the DOM tree changing the base target to _self.

I'm thinking that there is an easier way to do this -- maybe have the iframe
load into a container frame. When a link is clicked on the remote page
(inside the iframe) it will create a new frame container thence always
keeping it inside the iframe and container frame.

Could I do that? How would I do that?

I created a dummy page as a cheap example:
http://www.speakeasy.org/~robo/js_prob
Clicking on the "parent target" link duplicates the problem I'm having.

TIA!
Nov 24 '05 #1
2 4069
Rob wrote:
I have a page that loads a remote page into an IFRAME.
Standard security restrictions will prevent a remote page from being
accessed with scripts so you will not be able to alter it at all under
those circumstances. You can have that security restriction removed for
trusted sites in your various users' browsers, but that is quit an
effort to set up in itself.
I don't have any control over this remote page though
the page is owned by the same company I work for.
You cannot even ask for it to be changed? (it would be a quick search
and replace operation so wouldn't take too long)
The problem is that all of the pages have <base
target='_parent '> specified -- so every link will
bust out of the IFRAME.

One solution I thought of was to load the page via a
server side language, then run through the DOM tree
changing the base target to _self.
That would do it, but seems a bit extream.
I'm thinking that there is an easier way to do this --
maybe have the iframe load into a container frame. When
a link is clicked on the remote page (inside the iframe)
it will create a new frame container thence always keeping
it inside the iframe and container frame.
If the target is _parent then each navigation will only bump the
contents up one level in your page, so an IFRAME in an IFRAME would only
replace the outermost IFRAME (of course if a second link did the same
you would be back at square one.
Could I do that?
Yes, I cannot tell if it would help or not.
How would I do that?


HTML.

Richard.
Nov 24 '05 #2
On 2005-11-24, Rob <ro************ *************** *******@speakea sy.net> wrote:
Hi Gang:

I have a page that loads a remote page into an IFRAME.
I don't have any control over this remote page though the page is owned by
the same company I work for.

The problem is that all of the pages have <base target='_parent '> specified
-- so every link will bust out of the IFRAME.

One solution I thought of was to load the page via a server side language,
then run through the DOM tree changing the base target to _self.
could you use the dom to change the <base> tag?
I'm thinking that there is an easier way to do this -- maybe have the iframe
load into a container frame. When a link is clicked on the remote page
(inside the iframe) it will create a new frame container thence always
keeping it inside the iframe and container frame.

Could I do that? How would I do that?


iframe inside iframe ?

Bye.
Jasen
Nov 25 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2028
by: Jackson | last post by:
Anyone now how to redirect my asp page, from a _top frame to the _parent frame?
5
7197
by: MB | last post by:
Hello! I am using a frameset and vb codebehind to work with a database. When pressing a delete button in one of my frames, I want the hole application to be refreshed, or at least another of my frames to be refreshed. I don't really understand how to do this. I tried with response.redirect("Frameset1.htm") but I can't set target frame _parent for this command. I regular <a href="Frameset1.htm" target="_parent">test</a> would solve my...
2
5325
by: Rez | last post by:
Hi Guys, I have a problem with exporting to excel from a modal dialog box. Basically, i have an ASPX page that gathers user criteria, and passes it to a dialogbox (showModalDialog), There is a grid on the dialog that will be populated based on the criteria. Since i am doing some postback on the dialog i have the following tag in the header: <base target="_self">
1
1350
by: m_hansford | last post by:
I have a Menu control that populates from a SiteMap file. It's on my Master Page and usually loads content pages. I've got 2 problems at the moment: - Some of my menu items point to an external web site or to a PDF document instead of just loading the next internal page. I want these external links to open in a new browser window while retaining the default target of _self. How can I do this? The only stuff I've seen so far is based...
8
2615
by: mikeweber3 | last post by:
I am using a shareware program to remote control a DOS 6.22 workstation from a windows viewer over the internet. It works great and I want to run concurrant sessions on the same WAN. In order to do that I will have to change the port The Viewer is written in JAVA. The Host is written in C. The developer lists a switch option for changing the JAVA VIEWER, but I see no way to switch the port setting in the HOST. If...
2
1652
by: Miaaa Mukherjee | last post by:
Hello frdz, I have created ASP.Net website in which i have created the main page with the topmenu(which is of images),the middle menu(which is of different links like Home,Contact us,Feedback),the left menu(which contains the links to different menus). My problem is that everytime i click on the link it open the page on to the different new window.I want to open the page on the same window with that main page created. ...
1
3621
by: =?Utf-8?B?bWdkZXY=?= | last post by:
I've got a lot of modal dialog boxes in my web application that do postbacks. Originally my application was developed in VS 2003 and everything worked fine. Now I'm upgrading to VS 2005 and all of the pages that were upgraded by VS appear to be working fine. But any new pages I create to work as a modal dialog box don't work properly during the postback. When any event causes a postback in my new modal dialog boxes the client will open...
5
19933
by: Joe Kovac | last post by:
Hi! I want to add <base target="_self"> into the header section of a aspx page. I want to do this in the code behind because I use master pages which I do not want to change directly. Thanks Joe
0
5451
by: oopaevah | last post by:
Hi, I have a set of valid xhtml pages that a third party web site is integrating with via an <iframein his own page. This retains his own branding template in the header and footer, with the iframe containing my pages in the middle of the screen. When it is time to exit my pages, to take the user back to the third party web site, I need to direct the browser out of the iframe and to one of his pages. I leave it at that and his site...
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10168
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10008
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9837
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5279
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.