Connecting Tech Pros Worldwide Forums | Help | Site Map

<div> Not Working in Netscape

Jeff Johnson
Guest
 
Posts: n/a
#1: Jul 20 '05
Hi Everybody,

I have a function that works great in IE but fails in NN. Would
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!
updateContent(oFrame);
return;
}
setTimeout("init();",200);
return;
}

function updateContent(oFrame){
oFrame.wH(oFrame.gE('divSummary'), '<%= sHTML%>');
return;
}

Your reply is greatly appreciated,

Jeff

DU
Guest
 
Posts: n/a
#2: Jul 20 '05

re: <div> Not Working in Netscape


Jeff Johnson wrote:
[color=blue]
> Hi Everybody,
>
> I have a function that works great in IE but fails in NN.[/color]

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

Would[color=blue]
> 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![/color]

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, ...

[color=blue]
> updateContent(oFrame);
> return;
> }
> setTimeout("init();",200);
> return;
> }[/color]

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.
[color=blue]
>
> function updateContent(oFrame){
> oFrame.wH(oFrame.gE('divSummary'), '<%= sHTML%>');
> return;
> }
>
> Your reply is greatly appreciated,
>
> Jeff[/color]

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

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html


Closed Thread