<div> Not Working in Netscape

J

Jeff Johnson

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
 
D

DU

Jeff said:
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.

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!

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.

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/doctorunclear/Netscape7/Netscape7Section.html
 

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,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top