Netscape 7+ & IFrame

B

Brett Robichaud

I'm using the HTML below as a transition page. It is shown while a
page that takes a long time to load is processed (report.asp). It
works just fine under IE6 but not Netscape 7.

The ReportTransition.htm referenced simply contains this (nothing
else):
<img src="ReportTransition.gif" />

The following is the html that does not work in Netscape 7, any idea
what's wrong with it or a way I could do this better?


<html>
<head>
<script language="javascript">
function BeginPageLoad()
{
window.frames['frameImage'].location = "ReportTransition.htm";
document.location.href = 'report.asp';
}
</script>
</head>
<body onload="BeginPageLoad()">
<table border="0" cellpadding="0" cellspacing="0" width="100%"
height="100%">
<tr>
<td align="center" valign="middle">
<iframe id="frameImage" frameborder="no" width="360"
height="170"></iframe>
</td>
</tr>
</table>
</body>
</html>
 
M

Michael Winter

I'm using the HTML below as a transition page. It is shown while a
page that takes a long time to load is processed (report.asp). It
works just fine under IE6 but not Netscape 7.

You might be better off with using the DOM-defined HTMLIFrameElement.src
property. Mozilla certainly supports that, but not location. For example:

var frm = window.frames[ 'frameImage' ];

if( frm ) {
if( 'undefined' != typeof frm.src ) {
frm.src = 'ReportTransition.htm';
} else if( 'undefined' != typeof frm.location ) {
frm.location = 'ReportTransition.htm';
}
}
The ReportTransition.htm referenced simply contains this (nothing
else):
<img src="ReportTransition.gif" />

Do you include an XHTML DOCTYPE before using XHTML syntax? You don't
include any DOCTYPE at all in the HTML you posted.

[snip]
<script language="javascript">

This should read:

<script type="text/javascript">

The type attribute is required whilst the language attribute is deprecated
and should no longer be used.

[snip]

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,229
Latest member
GloryAngul

Latest Threads

Top