Problems with target tag in frameset

liunx

Guest
Hi...<br />
<br />
Can anyone shed any light on the following problem.<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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?<br />
<br />
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.<br />
<br />
Thanks very much.<!--content-->No, there really is no way around this. You have no way to control others sites, so if they have some code like this:<br />
<br />
<script language="javascript" type="text/javascript"><br />
if (top.location != self.location)<br />
top.location = self.location;<br />
</script><br />
<br />
That will replace the frameset with the current page as the top. <br />
<br />
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. <br />
<br />
Sorry, but you don't have many options on this one...<!--content-->Thank you for your help. However I do have one more question.<br />
<br />
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.<br />
<br />
I have specifically seen this with <!-- w --><a class="postlink" href="http://www.msnbc.com">www.msnbc.com</a><!-- w --><br />
<br />
Here is an example:<br />
<br />
1) Through a link in a menu (left hand frame) MSNBC.com is loaded.<br />
<br />
2) Any links clicked on from the MSNBC page is also properly loaded into the same target frame.<br />
<br />
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?<br />
<br />
Any more thoughts on this one?<br />
<br />
Much appreciated.<br />
<br />
Ryan<!--content-->Could you post a link where I can see the problem?<!--content-->Hi....<br />
<br />
You can view the problem at <br />
<br />
<!-- m --><a class="postlink" href="http://www.notimetosearch.com">http://www.notimetosearch.com</a><!-- m --><br />
<br />
To see the problem in action, click on "News" in the left hand menu bar, then select "Television", and MSNBC.<br />
<br />
MSNBC.com will load in the "body" window.<br />
<br />
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. <br />
<br />
This is the problem I am seeking resolution to.<br />
<br />
Thanks again for your help.<br />
<br />
Ryan<!--content-->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...<!--content-->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.<br />
<br />
But should what MSNBC sets as targets overwrite the target element I set within my submenu?<br />
<br />
Ryan<!--content-->Yes. The actual link will overrule anything you try to do...<!--content-->
 
Back
Top