<div> Not Working in Netscape

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeff Johnson

    <div> Not Working in Netscape

    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(o Frame);
    return;
    }
    setTimeout("ini t();",200);
    return;
    }

    function updateContent(o Frame){
    oFrame.wH(oFram e.gE('divSummar y'), '<%= sHTML%>');
    return;
    }

    Your reply is greatly appreciated,

    Jeff
  • DU

    #2
    Re: &lt;div&gt; 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(o Frame);
    > return;
    > }
    > setTimeout("ini t();",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(o Frame){
    > oFrame.wH(oFram e.gE('divSummar y'), '<%= 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:

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



    Comment

    Working...