/    Sign up×
Community /Pin to ProfileBookmark

Problems with target tag in frameset

Hi…

Can anyone shed any light on the following problem.

I am currently working on a page that is comprised of 4 frames. 3 frames have site information and menu type data, and 1 is used to view pages selected by using the submenu (consider the 4th frame to be the content frame).

The design point of the page is to be able to view various pages in the content window by selecting the page from the menu. In 99% of the cases, the “content” pages are external to my site.

With most pages that are being loaded the target= tag works properly and the page is loaded into the appropriate frame. However, some pages disregard the target= tag, and spawn a new window, or worse yet, trigger the new page load to _top and replace my primary page. From this point, any link clicked on from my original frame page (ie. my menu) opens in this new window, and will not load in my content frame.

It is as if the content page has been renamed, and the new window that was spawned has been renamed as the name of the original content taget frame.

I know that some sites force themselves to be opened in the _top window and thus do not allow themselves to be opened in a frame through Javascript, however is there a way to get around it, or at the very least allow that child window to be opened, but have other links still open in the original content window?

I have searched many sites on this topic, and have thus far come up empty, so I hope my explanation is clear, and that someone can offer some advice.

Thanks very much.

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@pyroMar 11.2003 — No, there really is no way around this. You have no way to control others sites, so if they have some code like this:

<script language="javascript" type="text/javascript">

if (top.location != self.location)

top.location = self.location;

</script>

That will replace the frameset with the current page as the top.

The only thing you can do is to open the sites that do this in a new window. From your post, I'm guessing that that would be impractical.

Sorry, but you don't have many options on this one...
Copy linkTweet thisAlerts:
@proceviatauthorMar 12.2003 — Thank you for your help. However I do have one more question.

I understand the javascript element to overwrite the initial page with the new page....but I am confused about a page that WILL load in the specified target frame....but then any subsequent pages targeted for the same frame are opened in new windows.

I have specifically seen this with www.msnbc.com

Here is an example:

1) Through a link in a menu (left hand frame) MSNBC.com is loaded.

2) Any links clicked on from the MSNBC page is also properly loaded into the same target frame.

3) The problem occurs when the user selects a different link from the menu frame. The link specified from the menu, is now opened up in a new frame, as if the previously used target frame no longer exists?

Any more thoughts on this one?

Much appreciated.

Ryan
Copy linkTweet thisAlerts:
@pyroMar 12.2003 — Could you post a link where I can see the problem?
Copy linkTweet thisAlerts:
@proceviatauthorMar 13.2003 — Hi....

You can view the problem at

http://www.notimetosearch.com

To see the problem in action, click on "News" in the left hand menu bar, then select "Television", and MSNBC.

MSNBC.com will load in the "body" window.

From this point forward, and site you select from the menu above the content window (within business or otherwise) will open in a new window.

This is the problem I am seeking resolution to.

Thanks again for your help.

Ryan
Copy linkTweet thisAlerts:
@pyroMar 13.2003 — Ok, I'm going to take a guess here. I'm guessing that msnbc sets their own targets, which would explain why that is happening. Perhaps they set each link to target="_top" or something...
Copy linkTweet thisAlerts:
@proceviatauthorMar 13.2003 — Hi again. I went and took a look at the html source for MSNBC and you are right...they do send all of their tragets to _top.

But should what MSNBC sets as targets overwrite the target element I set within my submenu?

Ryan
Copy linkTweet thisAlerts:
@pyroMar 13.2003 — Yes. The actual link will overrule anything you try to do...
×

Success!

Help @proceviat spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...