CRISIL
asked on
Iframes visibility in Netscape 6
Hi everyone -
I am using the foll iframe code in my application.
<iframe name='ifrm1' id='ifrm1' src="newsearchpagedoc" frameborder='no' style="BORDER-RIGHT: #d3d4ed thin solid; BORDER-TOP: #d3d4ed thin solid; VISIBILITY:visible; BORDER-LEFT: #d3d4ed thin solid; BORDER-BOTTOM: #d3d4ed thin solid" width=550 scrolling=yes height=200> </iframe>
<iframe name='ifrm2' id='ifrm2' src="newsearchpagedata" frameborder='no' style="BORDER-RIGHT: #d3d4ed thin solid; BORDER-TOP: #d3d4ed thin solid; VISIBILITY:hidden; BORDER-LEFT: #d3d4ed thin solid; BORDER-BOTTOM: #d3d4ed thin solid" width=0 scrolling=yes height=0></iframe>
The code is supposed to show the first frame by default and I have a javascript that toggles the two w.r.t to images provided above them. This code works completely fine in IE, but in Netscape 6 when I load the page for the first time, I see the contents of the hidden iframe.However when I refresh that frame manually the actual content comes up. Further the url shown for the iframe is also correct.
Please suggest what could be going wrong.
Ritu
I am using the foll iframe code in my application.
<iframe name='ifrm1' id='ifrm1' src="newsearchpagedoc" frameborder='no' style="BORDER-RIGHT: #d3d4ed thin solid; BORDER-TOP: #d3d4ed thin solid; VISIBILITY:visible; BORDER-LEFT: #d3d4ed thin solid; BORDER-BOTTOM: #d3d4ed thin solid" width=550 scrolling=yes height=200> </iframe>
<iframe name='ifrm2' id='ifrm2' src="newsearchpagedata" frameborder='no' style="BORDER-RIGHT: #d3d4ed thin solid; BORDER-TOP: #d3d4ed thin solid; VISIBILITY:hidden; BORDER-LEFT: #d3d4ed thin solid; BORDER-BOTTOM: #d3d4ed thin solid" width=0 scrolling=yes height=0></iframe>
The code is supposed to show the first frame by default and I have a javascript that toggles the two w.r.t to images provided above them. This code works completely fine in IE, but in Netscape 6 when I load the page for the first time, I see the contents of the hidden iframe.However when I refresh that frame manually the actual content comes up. Further the url shown for the iframe is also correct.
Please suggest what could be going wrong.
Ritu
It could be a bug in Netscape 6.
Netscape 6 is not used very much because it has lots of bugs.
Does it work in Netscape 7 and Firefox?
Supporting Netscape 7 should be enough.
Netscape 6 is not used very much because it has lots of bugs.
Does it work in Netscape 7 and Firefox?
Supporting Netscape 7 should be enough.
ASKER
Hi -
I tried removing the width and height and also tested it in Netscape 7, the problem persists. Any other suggestions....?
Ritu
I tried removing the width and height and also tested it in Netscape 7, the problem persists. Any other suggestions....?
Ritu
Let's sett the whole page. Post a link or the page code, obviously there is something wrong with the page, not just the iframe.
Cd&
Cd&
I agree with Cd&, we need the complete page.
ASKER
Hi - I am pasting the html page here...pls help
<head>
<title></title>
<link rel="STYLESHEET" type="text/css" href="../cm/coolmenus.css" >
<link rel="stylesheet" href="../cm/StyleSheet.css " type="text/css">
<script type="text/javascript" src="../cm/calendar1.js">< /script>
</head>
<body onload = "changeCursor('Normal')" onunload="changeCursor('Wa it')" bgcolor="#FFFFFF" background="../images/Tops ide1.jpg" Topmargin=0 Leftmargin=0 Marginheight=0 Marginwidth=0 >
<script language='javascript'>
function switchSrc(tomode)
{
var browserVer=navigator.appNa me;
if(tomode=="D")
{
if(browserVer=="Microsoft Internet Explorer")
{
document.all.ifrm2.style.v isibility= 'hidden';
document.all.ifrm2.style.b orderRight ='';
document.all.ifrm2.style.b orderLeft= '';
document.all.ifrm2.style.b orderTop=' ';
document.all.ifrm2.style.b orderBotto m='';
document.all.ifrm2.style.w idth=0;
document.all.ifrm2.style.h eight=0;
document.all.img1.src='../ images/Doc umentsSele cted.jpg';
document.all.ifrm1.style.v isibility= 'visible';
document.all.ifrm1.style.w idth=550;
document.all.ifrm1.style.h eight=200;
document.all.ifrm1.style.b orderRight ='#d3d4ed thin solid';
document.all.ifrm1.style.b orderLeft= '#d3d4ed thin solid';
document.all.ifrm1.style.b orderTop=' #d3d4ed thin solid';
document.all.ifrm1.style.b orderBotto m='#d3d4ed thin solid';
document.all.img2.src='../ images/Dat aDeSelecte d.jpg';
}
if(browserVer=="Netscape")
{
document.getElementById("i frm2").sty le.visibil ity='hidde n';
document.getElementById("i frm2").sty le.borderR ight='';
document.getElementById("i frm2").sty le.borderL eft='';
document.getElementById("i frm2").sty le.borderT op='';
document.getElementById("i frm2").sty le.borderB ottom='';
document.getElementById("i frm2").sty le.width=0 ;
document.getElementById("i frm2").sty le.height= 0;
document.getElementById("i mg1").src= '../images /Documents Selected.j pg';
document.getElementById("i frm1").sty le.visibil ity='visib le';
document.getElementById("i frm1").sty le.width=5 50;
document.getElementById("i frm1").sty le.height= 200;
document.getElementById("i frm1").sty le.borderR ight='#d3d 4ed thin solid';
document.getElementById("i frm1").sty le.borderL eft='#d3d4 ed thin solid';
document.getElementById("i frm1").sty le.borderT op='#d3d4e d thin solid';
document.getElementById("i frm1").sty le.borderB ottom='#d3 d4ed thin solid';
document.getElementById("i mg2").src= '../images /DataDeSel ected.jpg' ;
}
}
else if(tomode=="T")
{
if(browserVer=="Microsoft Internet Explorer")
{
document.all.ifrm1.style.v isibility= 'hidden';
document.all.ifrm1.style.b orderRight ='';
document.all.ifrm1.style.b orderLeft= '';
document.all.ifrm1.style.b orderTop=' ';
document.all.ifrm1.style.b orderBotto m='';
document.all.ifrm1.style.w idth=0;
document.all.ifrm1.style.h eight=0;
document.all.img1.src='../ images/Doc umentsDese lected.jpg ';
document.all.ifrm2.style.v isibility= 'visible';
document.all.ifrm2.style.w idth=550;
document.all.ifrm2.style.h eight=200;
document.all.ifrm2.style.b orderRight ='#d3d4ed thin solid';
document.all.ifrm2.style.b orderLeft= '#d3d4ed thin solid';
document.all.ifrm2.style.b orderTop=' #d3d4ed thin solid';
document.all.ifrm2.style.b orderBotto m='#d3d4ed thin solid';
document.all.img2.src='../ images/Dat aSelected. jpg';
}
if(browserVer=="Netscape")
{
document.getElementById("i frm1").sty le.visibil ity='hidde n';
document.getElementById("i frm1").sty le.borderR ight='';
document.getElementById("i frm1").sty le.borderL eft='';
document.getElementById("i frm1").sty le.borderT op='';
document.getElementById("i frm1").sty le.borderB ottom='';
document.getElementById("i frm1").sty le.width=0 ;
document.getElementById("i frm1").sty le.height= 0;
document.getElementById("i mg1").src= '../images /Documents Deselected .jpg';
document.getElementById("i frm2").sty le.visibil ity='visib le';
document.getElementById("i frm2").sty le.width=5 50;
document.getElementById("i frm2").sty le.height= 200;
document.getElementById("i frm2").sty le.borderR ight='#d3d 4ed thin solid';
document.getElementById("i frm2").sty le.borderL eft='#d3d4 ed thin solid';
document.getElementById("i frm2").sty le.borderT op='#d3d4e d thin solid';
document.getElementById("i frm2").sty le.borderB ottom='#d3 d4ed
thin solid';
document.getElementById("i mg2").src= '../images /DataSelec ted.jpg';
}
}
}
</script>
<table width="100%" border=0 cellpadding=0 cellspacing=0>
<tr>
<td width="8%" align=center><a style='cursor:hand' onclick='javascript:switch Src("D")'> <img id=img1 src='../images/DocumentsSe lected.jpg ' border=0></a></td>
<td width="8%" align=center><a style='cursor:hand' onclick='javascript:switch Src("T")'> <img id=img2 src='../images/DataDeSelec ted.jpg' border=0></a></td>
<td> </td>
</tr>
<tr>
<td colspan=3>
<iframe name='ifrm1' id='ifrm1' src="newsearchpagedoc" frameborder='no' style="BORDER-RIGHT: #d3d4ed thin solid; BORDER-TOP: #d3d4ed thin solid; VISIBILITY:visible; BORDER-LEFT: #d3d4ed thin solid; BORDER-BOTTOM: #d3d4ed thin solid" width=550 scrolling=yes height=200> </iframe>
<iframe name='ifrm2' id='ifrm2' src="newsearchpagedata" frameborder='no' style="BORDER-RIGHT: #d3d4ed thin solid; BORDER-TOP: #d3d4ed thin solid; VISIBILITY:hidden; BORDER-LEFT: #d3d4ed thin solid; BORDER-BOTTOM: #d3d4ed thin solid" width=1 scrolling=yes height=1></iframe>
</td>
</tr>
</table>
</body>
</html>
<head>
<title></title>
<link rel="STYLESHEET" type="text/css" href="../cm/coolmenus.css"
<link rel="stylesheet" href="../cm/StyleSheet.css
<script type="text/javascript" src="../cm/calendar1.js"><
</head>
<body onload = "changeCursor('Normal')" onunload="changeCursor('Wa
<script language='javascript'>
function switchSrc(tomode)
{
var browserVer=navigator.appNa
if(tomode=="D")
{
if(browserVer=="Microsoft Internet Explorer")
{
document.all.ifrm2.style.v
document.all.ifrm2.style.b
document.all.ifrm2.style.b
document.all.ifrm2.style.b
document.all.ifrm2.style.b
document.all.ifrm2.style.w
document.all.ifrm2.style.h
document.all.img1.src='../
document.all.ifrm1.style.v
document.all.ifrm1.style.w
document.all.ifrm1.style.h
document.all.ifrm1.style.b
document.all.ifrm1.style.b
document.all.ifrm1.style.b
document.all.ifrm1.style.b
document.all.img2.src='../
}
if(browserVer=="Netscape")
{
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
}
}
else if(tomode=="T")
{
if(browserVer=="Microsoft Internet Explorer")
{
document.all.ifrm1.style.v
document.all.ifrm1.style.b
document.all.ifrm1.style.b
document.all.ifrm1.style.b
document.all.ifrm1.style.b
document.all.ifrm1.style.w
document.all.ifrm1.style.h
document.all.img1.src='../
document.all.ifrm2.style.v
document.all.ifrm2.style.w
document.all.ifrm2.style.h
document.all.ifrm2.style.b
document.all.ifrm2.style.b
document.all.ifrm2.style.b
document.all.ifrm2.style.b
document.all.img2.src='../
}
if(browserVer=="Netscape")
{
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
document.getElementById("i
thin solid';
document.getElementById("i
}
}
}
</script>
<table width="100%" border=0 cellpadding=0 cellspacing=0>
<tr>
<td width="8%" align=center><a style='cursor:hand' onclick='javascript:switch
<td width="8%" align=center><a style='cursor:hand' onclick='javascript:switch
<td> </td>
</tr>
<tr>
<td colspan=3>
<iframe name='ifrm1' id='ifrm1' src="newsearchpagedoc" frameborder='no' style="BORDER-RIGHT: #d3d4ed thin solid; BORDER-TOP: #d3d4ed thin solid; VISIBILITY:visible; BORDER-LEFT: #d3d4ed thin solid; BORDER-BOTTOM: #d3d4ed thin solid" width=550 scrolling=yes height=200> </iframe>
<iframe name='ifrm2' id='ifrm2' src="newsearchpagedata" frameborder='no' style="BORDER-RIGHT: #d3d4ed thin solid; BORDER-TOP: #d3d4ed thin solid; VISIBILITY:hidden; BORDER-LEFT: #d3d4ed thin solid; BORDER-BOTTOM: #d3d4ed thin solid" width=1 scrolling=yes height=1></iframe>
</td>
</tr>
</table>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Cd&