Not Working in Netscape

Giganews Newsgroups
Subject: Re: <div> Not Working in Netscape
Posted by:  DU (druncle…
Date: Wed, 30 Jul 2003

Jeff Johnson wrote:

> Hi Everybody,
> I have a function that works great in IE but fails in NN.

NN could mean Netscape 4.7 or it could mean Netscape 7.1: HUGE
difference between the 2.

> someone please give me some insight as to how to correct this:
> function init(){
>     var oFrame = parent.frames['content'];
>     if (typeof(oFrame.divSummary) != 'undefined'){***** fails here!

oFrame is a window object reference. And divSummary most likely is a div
id attribute. You can't access just like that a div within a document
within a window object.

In any case, you're trying to verify if a div in a frame you loaded
exists. I don't understand why. In any case, just an onload event on the
body might suffice. It depends on what you want to achieve exactly:
webpage context, situation, ...

>         updateContent(oFrame);
>         return;
>     }
>     setTimeout("init();",200);
>     return;        
> }

This will lead to a recursive function and such usually imposes a lot of
to the users' system resources . This is definitively not recommendable.
There is no ending condition to your recursive calls here. If the user
is connected to this function for 5 min., then every 0.2 sec., the
function will start checking if your divSummary exists or does not
exist: it never ends! That's insane.
What exactly are you trying to achieve? You may be trying to find the
solution to a wrongly assessed problem.

> function updateContent(oFrame){
>     oFrame.wH(oFrame.gE('divSummary'), '<%= sHTML%>');
>     return;        
> }
> Your reply is greatly appreciated,
> Jeff

You should give more specifics about your webpage situation, design. An
url is usually also necessary to assess issues.

Javascript and Browser bugs:
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x



In response to

Not Working in Netscape posted by jeffejohns… (Jeff Johnson) on 30 Jul 2003