doesn't clear page




19 years ago
a year ago


(Reporter: markoft, Assigned: vidur (gone))


Windows 98

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [HAVE FIX], URL)


(1 attachment)



19 years ago
I have a gallery page at the above URL that was written to allow Netscape users
to view the gallery in a similar fashion to how IE veiws it.  The IE gallery
page still kills Mozilla but that is really kinda expected...
The problem is with the Netscape page.  It loads a frameset where you make
selections in the top frame and the top frame creates a new page in the bottom
page.  M8 loaded the page fine but it would not write new pages below, it would
just add to the current page shown, after you reselected the image you wished to
view.  I also downloaded the latest build (199072711) to see if there was still
a problem but this time it would not even write/render the bottom page.  This is
the first time I've used Mozilla so I do not know if you have added a Clear
command that needs to be used before writing to a new page or if this ia bug in
the Javascript code.
Created attachment 1095 [details]
Sample (zipped) files that shows a posible document.write error
The zip file contains three HTML docs: the frameset and the two frames. The
first one (dom.html) contains the code. It works on Nav4 but not on Mozilla M8
under Win98.
I see two problems here:

1) javascript: URLs aren't working right now.  That's bug 1646.  This is why the
side arrows aren't working.  The drop-down box works, though.

2) doesn't empty the existing page, at least when called with
Component: DOM Level 0 → DOM Level 1
Summary: DHTML/Javascript error or Bug in NGLayout? → doesn't clear page
Since one part here is another bug, this one should be (as was the emphasis in
the original report) for #2 above.  Retitling appropriately.

DOM Level 1 is quite clear that should clear the page.
Therefore, changing component from DOM Level 0 to Level 1.  Simpler test case is
on its way.

See also bug 9787.
I can't replicate this in a simple test case... except when the document being
open()ed is the document containing the script, in which case mozilla mimics

There are some strange things happening,though...

Note that the code here doesn't actually call document close - it doesn't have
the ().  That causes the text to disappear it 4.6 when I simplify it (in

I don't understand what's happening.  Sometimes, right as I'm leaving the URL
and loading a new one, though, I see three what I document.wrote() twice,
instead of once like it had and should have been.

Comment 6

19 years ago
The simple test case does work and the page itself works when you put the ()
after the document.close. Well, also after you apply the following patch (which
I'll try to check in after the tree reopens for M12). My current thought is to
mark this INVALID once I get in the patch - the content should be modified to be
valid. Ok with you,

Index: nsJSUtils.cpp
RCS file: /cvsroot/mozilla/dom/src/base/nsJSUtils.cpp,v
retrieving revision 1.19
diff -r1.19 nsJSUtils.cpp
<   if (JSVAL_IS_BOOLEAN(aValue) && JS_ValueToBoolean(aContext, aValue, &temp))
>   if (JS_ValueToBoolean(aContext, aValue, &temp)) {


19 years ago
Whiteboard: [HAVE FIX]

Comment 7

19 years ago
Sounds like a plan to me vidur, so long as the () gets/is documented
somewhere.  Just spent 2 days fighting with a program and only reading the
source let me know what was wrong.  Thanks for fixing it, and my code...8-)...


19 years ago
Last Resolved: 19 years ago
Resolution: --- → INVALID

Comment 8

19 years ago
Fixed on 12/14/1999. Note that the fix is the one that allows any type to be
passed in instead of a boolean. Marking this bug INVALID as agreed to earlier.


19 years ago

Comment 9

19 years ago
You need to log in before you can comment on or make changes to this bug.