Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frame Problems in IE7 1

Status
Not open for further replies.

Moebius01

Programmer
Oct 27, 2000
309
US
I searched around, but couldn't find much here. Obviously, IE7 is still beta, so I don't have to officially support it yet, but some of my clients are early adopter types, which spells trouble on the way. In a nutshell, I manage a realtime reporting system for my company that delivers data to clients via Web pages. It's built on an ASP.net back end, with some other stuff tossed in for good confusion (I didn't design the core).

The main pages use a NavBar style frameset where the top frame contains a toolbar with buttons for the various pages a client might have, and the lower frame contains the data page. I use the <base target> tag for the links in the nav bar to force them to load in the lower frame.

Recently, I downloaded IE7 on my personal machine just to check it out, and on a whim hit my work site just to see how it displayed. Unfortunately, that was a bad thing. What I get in IE7 is the initial frameset builds, but when the links are selected, data loads in the top navbar frame rather than the lower data frame.

I've dug around and haven't found anything specific on IE7 changing or dropping support for the old frameset tags. Is anyone playing with IE7 yet, and if so, have you worked with frames at all? Generally, I don't go for frames, but several of these clients go back a few years and for a while, this navbar approach has been the standard. That said, at the current time, I don't really have the manpower to go back and revamp several hundred pages to completely remove or change the frame coding, so I'm desperately trying to find out what's happening with IE7 to see if there's an easy fix.
 
I'm not too familiar with the DocType stuff so I may have it wrong, but I did try adding a Frameset DTD with no luck.

This is what the frameset page currently looks like.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/frameset.dtd">[/URL]
<HTML><HEAD><TITLE>Contact Center Statistics</TITLE>
</HEAD>
<frameset rows="60,*">
	<frame src="navbar.htm" name="navbar" scrolling="no" noresize marginwidth="5" marginheight="5" frameborder="0">
	<frame src="StartFrm.htm" name="dataframe">
</frameset>
</HTML>

And here's an example of the navbar code. It uses some javascript to color links and such to identify page in use.

Code:
<html>
<style><!--
a:hover{color:#1828A0}
a{text-decoration:none}
//--></style>
<script language=javascript>
function linkClick(link) {
// Reset All Links
for (i=0; i<document.links.length; i++) {
		document.links[i].style.color='#000000'
		}
// Mark Clicked Link
		link.style.color='#FF0000'
}
function initialLink() {
// Load First Link and Highlite
	document.links[0].style.color='#FF0000'
	document.links[0].click()
}
// Break Frames and Return to Menu
function mainmenu(link) {
	top.location.href="/main.aspx?Function=4"
	linkClick(link)
}
</script> 
<body bgcolor=#FFFFFF link=#000000 vlink=#000000 alink=#000000 onload="initialLink()">
<base target="dataframe">
<table width=100%>
<tr>
	<td valign=top><img src="logo.gif"></td>
	<td><font size=5 color=#000000 face="Arial"><B>
			<a STYLE="text-decoration:none" href="2121frm.aspx" onclick="linkClick(this)"><B>RealTime Stats</a>
 	</td>
	<td><font size=5 color=#000000 face="Arial"><B>
			<a STYLE="text-decoration:none" href="intervalfrm.aspx" onclick="linkClick(this)"><B>Summary Interval</a>
 	</td>
 	<td align=right><font size=5 color=#000000 face="Arial"><B>
 			<a STYLE="text-decoration:none; cursor:pointer;" onMouseOver="this.style.color='#FF0000'" onMouseOut="this.style.color='#000000'" onclick="mainmenu(this)"><B>Menu</a>&nbsp;&nbsp;
 	</td>
</tr>
</table>

</body>
</html>

I use the base target tag so that all links are supposed to open in the dataframe (lower). This works in IE6, as well as a few others I tested back in the day, but in IE7, the links open in the same frame as the navbar.
 
Microsoft said:
Versions of Internet Explorer prior to Internet Explorer 7 would allow the base element to appear anywhere in the document tree, which caused relative paths to use the "nearest" base element as the base for the URL. Internet Explorer 7 strictly enforces the use of the base tag within the head of the document, and will ignore misplaced tags.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Sorry, don't know how it got submitted.

Here is the link to the Microsofts Knowledge base Article regarding the base Element.


----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
That's the doc I've been looking for, thanks. For some reason I couldn't get a hit on MSDN.

Have a star, no charge. :)

 
Thanx for the star. Glad I could help.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top