Mozilla, document.open & memory

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ReGenesis0@aol.com

    Mozilla, document.open & memory

    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

  • Lee

    #2
    Re: Mozilla, document.open & memory

    ReGenesis0@aol. com said:[color=blue]
    >
    > 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.ope n call? As currently structured, my script calles an open,
    >then skips aroudn through functions, performing a series of
    >document.write s 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.[/color]

    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( ).

    Comment

    • RobG

      #3
      Re: Mozilla, document.open & memory

      ReGenesis0@aol. com wrote:[color=blue]
      > 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.[/color]

      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

      Comment

      • ReGenesis0@aol.com

        #4
        Re: Mozilla, document.open &amp; memory

        Lee wrote:
        [color=blue]
        >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( ).[/color]

        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*

        WHHHHHHHYYYYYYY YYYYY? 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

        Comment

        Working...