471,338 Members | 1,302 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 software developers and data experts.

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

Jul 23 '05 #1
3 1863
Lee
Re********@aol.com 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().

Jul 23 '05 #2
Re********@aol.com 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
Jul 23 '05 #3
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

Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by David List | last post: by
1 post views Thread by Greg | last post: by
8 posts views Thread by Nicolás Lichtmaier | last post: by
6 posts views Thread by Erik Steffl | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.