473,703 Members | 2,804 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 4065
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
2024
by: Jackson | last post by:
Anyone now how to redirect my asp page, from a _top frame to the _parent frame?
5
7192
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
5322
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
1339
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
2612
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
1646
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
3615
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
19932
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
5449
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
8739
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
9234
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...
1
8983
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7832
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6575
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5910
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4668
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3107
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
2037
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.