Mozilla, document.open & memory

Discussion in 'Javascript' started by ReGenesis0@aol.com, Feb 28, 2005.

  1. Guest

    I'm trying to rewrite the existing window using javascript. This
    works fine in IE- but in Mozilla, after I call a window.open, Mozilla
    starts wandering around like an alshiemers patient and bumping into
    doors.

    Specificly, Mozilla seems to be losing my... functions. Or
    variables. Except, I've tried alerts with dummy variables, and it
    seems to find THEM just fine...
    Does Mozilla start unloading existing memory right after a
    document.open call? As currently structured, my script calles an open,
    then skips aroudn through functions, performing a series of
    document.writes before closing.
    Would this problem go away if instead of performing that nonlinear
    series of writes, it performed a series of additions to a string and I
    just did one open/write/close at the end? (Doign so would be a neither
    major nor minor alteration, so I'm asking before attempting it.)

    Theological question: Who is 'right' here against the ruler of how
    javascript is SUPPOSED to perform? Have I simply been benefittign from
    IE's tardy/nonexistant memory cleanup, or is Mozilla overeager?
    (assuming, again, it is memory cleanup I'm running into.)

    Any help appreciated. I don't think I'm using anything beyond
    Javascript 1.2.

    -Derik
     
    , Feb 28, 2005
    #1
    1. Advertising

  2. Lee Guest

    said:
    >
    > I'm trying to rewrite the existing window using javascript. This
    >works fine in IE- but in Mozilla, after I call a window.open, Mozilla
    >starts wandering around like an alshiemers patient and bumping into
    >doors.
    >
    > Specificly, Mozilla seems to be losing my... functions. Or
    >variables. Except, I've tried alerts with dummy variables, and it
    >seems to find THEM just fine...
    > Does Mozilla start unloading existing memory right after a
    >document.open call? As currently structured, my script calles an open,
    >then skips aroudn through functions, performing a series of
    >document.writes before closing.
    > Would this problem go away if instead of performing that nonlinear
    >series of writes, it performed a series of additions to a string and I
    >just did one open/write/close at the end? (Doign so would be a neither
    >major nor minor alteration, so I'm asking before attempting it.)
    >
    > Theological question: Who is 'right' here against the ruler of how
    >javascript is SUPPOSED to perform? Have I simply been benefittign from
    >IE's tardy/nonexistant memory cleanup, or is Mozilla overeager?
    >(assuming, again, it is memory cleanup I'm running into.)
    >
    > Any help appreciated. I don't think I'm using anything beyond
    >Javascript 1.2.


    I consider Mozilla to be right, but I doubt that the standard is that
    specific. The first thing that a window.open() call does, at least in
    Mozilla, is to invoke window.clear(), so yes, you'll want to accumulate
    your output and do a single document.write().
     
    Lee, Feb 28, 2005
    #2
    1. Advertising

  3. RobG Guest

    wrote:
    > I'm trying to rewrite the existing window using javascript. This
    > works fine in IE- but in Mozilla, after I call a window.open, Mozilla
    > starts wandering around like an alshiemers patient and bumping into
    > doors.


    For the record:

    "Alzheimer’s (AHLZ-high-merz) disease is a progressive brain
    disorder that gradually destroys a person’s memory and
    ability to learn, reason, make judgments, communicate and
    carry out daily activities."

    <URL:http://www.alz.org/AboutAD/WhatIsAD.asp>


    Please be a little more circumspect in the description of your
    browser-related problems.

    --
    Rob
     
    RobG, Mar 1, 2005
    #3
  4. Guest

    Lee wrote:

    >The first thing that a window.open() call does, at
    >least in Mozilla, is to invoke window.clear(), so
    >yes, you'll want to accumulate your output and do
    >a single document.write().


    I did that- which makes my script much neater under the hood, thanks--
    but continued to experience the same problem.

    Guess what worked?
    Omitting the explicit document.open() and letting mozilla use the
    one implicit in document.write().

    *throws tantrum*

    WHHHHHHHYYYYYYYYYYYY? Why why why why WHY?

    ...why? I hate voodoo-scripting. "I'm not sure WHY it worked,
    but when I put a space BEFORE the semi-colon..."

    Why?

    no, seriously, why?
    -Derik
     
    , Mar 3, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Henri
    Replies:
    9
    Views:
    1,901
    Toby Inkster
    Feb 22, 2005
  2. Iain
    Replies:
    1
    Views:
    436
    Alexey Smirnov
    Apr 9, 2007
  3. David List

    document.layers & Mozilla

    David List, Sep 6, 2003, in forum: Javascript
    Replies:
    6
    Views:
    142
    Richard Cornford
    Sep 7, 2003
  4. Jim Ley
    Replies:
    3
    Views:
    230
  5. geefypants
    Replies:
    0
    Views:
    177
    geefypants
    Oct 28, 2004
Loading...

Share This Page