[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 231
  • Last Modified:

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
0
CRISIL
Asked:
CRISIL
  • 3
  • 2
  • 2
1 Solution
 
COBOLdinosaurCommented:
Width and height of zero are invalid.  You need to give them a value of 1.  The invalid specification could be causing it.  Try that change and if it solves it we get away lucky with an easy fix.

Cd&
0
 
GrandSchtroumpfCommented:
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.
0
 
CRISILAuthor Commented:
Hi -

   I tried removing the width and height and also tested it in Netscape 7, the problem persists. Any other suggestions....?

Ritu
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
COBOLdinosaurCommented:
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&
0
 
GrandSchtroumpfCommented:
I agree with Cd&, we need the complete page.
0
 
CRISILAuthor Commented:
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('Wait')" bgcolor="#FFFFFF" background="../images/Topside1.jpg" Topmargin=0 Leftmargin=0 Marginheight=0 Marginwidth=0 >
<script language='javascript'>



function switchSrc(tomode)
      {
            var browserVer=navigator.appName;

            if(tomode=="D")
            {
                  if(browserVer=="Microsoft Internet Explorer")
                  {
                  document.all.ifrm2.style.visibility='hidden';
                  document.all.ifrm2.style.borderRight='';
                  document.all.ifrm2.style.borderLeft='';
                  document.all.ifrm2.style.borderTop='';
                  document.all.ifrm2.style.borderBottom='';
                  document.all.ifrm2.style.width=0;
                  document.all.ifrm2.style.height=0;

                  document.all.img1.src='../images/DocumentsSelected.jpg';

                  document.all.ifrm1.style.visibility='visible';
                  document.all.ifrm1.style.width=550;
                  document.all.ifrm1.style.height=200;
                  document.all.ifrm1.style.borderRight='#d3d4ed thin solid';
                  document.all.ifrm1.style.borderLeft='#d3d4ed thin solid';
                  document.all.ifrm1.style.borderTop='#d3d4ed thin solid';
                  document.all.ifrm1.style.borderBottom='#d3d4ed thin solid';

                  document.all.img2.src='../images/DataDeSelected.jpg';
                  }

                  if(browserVer=="Netscape")
                  {
                  document.getElementById("ifrm2").style.visibility='hidden';
                  document.getElementById("ifrm2").style.borderRight='';
                  document.getElementById("ifrm2").style.borderLeft='';
                  document.getElementById("ifrm2").style.borderTop='';
                  document.getElementById("ifrm2").style.borderBottom='';
                  document.getElementById("ifrm2").style.width=0;
                  document.getElementById("ifrm2").style.height=0;

                  document.getElementById("img1").src='../images/DocumentsSelected.jpg';

                  document.getElementById("ifrm1").style.visibility='visible';
                  document.getElementById("ifrm1").style.width=550;
                  document.getElementById("ifrm1").style.height=200;
                  document.getElementById("ifrm1").style.borderRight='#d3d4ed thin solid';
                  document.getElementById("ifrm1").style.borderLeft='#d3d4ed thin solid';
                  document.getElementById("ifrm1").style.borderTop='#d3d4ed thin solid';
                  document.getElementById("ifrm1").style.borderBottom='#d3d4ed thin solid';

                  document.getElementById("img2").src='../images/DataDeSelected.jpg';
                  }
            }
            else if(tomode=="T")
            {
                  if(browserVer=="Microsoft Internet Explorer")
                  {
                  document.all.ifrm1.style.visibility='hidden';
                  document.all.ifrm1.style.borderRight='';
                  document.all.ifrm1.style.borderLeft='';
                  document.all.ifrm1.style.borderTop='';
                  document.all.ifrm1.style.borderBottom='';
                  document.all.ifrm1.style.width=0;
                  document.all.ifrm1.style.height=0;

                  document.all.img1.src='../images/DocumentsDeselected.jpg';

                  document.all.ifrm2.style.visibility='visible';
                  document.all.ifrm2.style.width=550;
                  document.all.ifrm2.style.height=200;
                  document.all.ifrm2.style.borderRight='#d3d4ed thin solid';
                  document.all.ifrm2.style.borderLeft='#d3d4ed thin solid';
                  document.all.ifrm2.style.borderTop='#d3d4ed thin solid';
                  document.all.ifrm2.style.borderBottom='#d3d4ed thin solid';

                  document.all.img2.src='../images/DataSelected.jpg';
            }

                  if(browserVer=="Netscape")
                  {
                  document.getElementById("ifrm1").style.visibility='hidden';
                  document.getElementById("ifrm1").style.borderRight='';
                  document.getElementById("ifrm1").style.borderLeft='';
                  document.getElementById("ifrm1").style.borderTop='';
                  document.getElementById("ifrm1").style.borderBottom='';
                  document.getElementById("ifrm1").style.width=0;
                  document.getElementById("ifrm1").style.height=0;

                  document.getElementById("img1").src='../images/DocumentsDeselected.jpg';

                  document.getElementById("ifrm2").style.visibility='visible';
                  document.getElementById("ifrm2").style.width=550;
                  document.getElementById("ifrm2").style.height=200;
                  document.getElementById("ifrm2").style.borderRight='#d3d4ed thin solid';
                  document.getElementById("ifrm2").style.borderLeft='#d3d4ed thin solid';
                  document.getElementById("ifrm2").style.borderTop='#d3d4ed thin solid';
                  document.getElementById("ifrm2").style.borderBottom='#d3d4ed

thin solid';

                  document.getElementById("img2").src='../images/DataSelected.jpg';
                  }
            }
      }


</script>


<table width="100%" border=0 cellpadding=0 cellspacing=0>
                        <tr>
                              <td width="8%" align=center><a style='cursor:hand' onclick='javascript:switchSrc("D")'><img id=img1 src='../images/DocumentsSelected.jpg' border=0></a></td>
                              <td width="8%" align=center><a style='cursor:hand' onclick='javascript:switchSrc("T")'><img id=img2  src='../images/DataDeSelected.jpg' border=0></a></td>
                              <td>&nbsp;</td>
                        </tr>
                        <tr>
                              <td colspan=3>
                                    &nbsp;<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>
0
 
COBOLdinosaurCommented:
Well Netscrap 6 was pretty dicey on iframes and the the whay they were built in the DOM.  Given that you are generating from client side script, it may be that the Netscrap 6 DOM gets broken; in which case it is simple not going to work.  On the other hahand it might simple be that Netscrap 6, refuses to process the non-standard style specification with no unit of measure specifiied:

document.getElementById("ifrm2").style.width=550;
document.getElementById("ifrm2").style.height=200;

needs to be:
document.getElementById("ifrm2").style.width=550+"px";
document.getElementById("ifrm2").style.height=200+"px";


Cd&

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now