Closed Bug 17351 Opened 25 years ago Closed 25 years ago

{doc.open}document.write to opened window during load not done/without effect

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Windows 95
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: martin.honnen, Assigned: jst)

References

()

Details

(Whiteboard: [nsbeta2+][jst])

Attachments

(1 file)

During load of an html document I use the following js function writeToWindow () { w.document.open(); w.document.write('<HTML><HEAD><\/HEAD><BODY><H1>Kibology<\/H1><\/BODY><\/HTML>') ; w.document.close(); } var w = window.open ('about:blank', 'w1'); writeToWindow(); The new window opens with about:blank but the new content doesn't appear. A subsequent document.write attempt triggered from <BUTTON ONCLICK="writeToWindow()"> write to opened window </BUTTON> shows up
Attached file bug demo (deleted) —
Blocks: 17907
In an attempt to get my bug list in order again, marking all the bugs I have currently as ASSIGNED.
*** Bug 26702 has been marked as a duplicate of this bug. ***
Blocks: 24698
Adding {doc.open} to summary to track related bugs. Marking M15 for now - we should try to get this one done earlier rather than later.
Summary: document.write to opened window during load not done/without effect → {doc.open}document.write to opened window during load not done/without effect
Target Milestone: M15
works for me on win98 M14, the new window opens blank, and when you click the button Kibology is written to the window.
In the test case the word "Kibology" should appear both when you load the document and when you click the button. The new window that opens should never appear blank (except for a fraction of a second after it is created and before "Kibology" is written to it). What rufus@nonstuff.de observed is actually the buggy behavior rather than a "works for me": the new window opened blank, and "Kibology" did not appear until he clicked on the button.
sorry, totally misread the script :o but I looked into it some more and this is very strange. usually (not always) if you switch to the new window imediatly as it's opened you'll see "Kibology" shown there while the page is still loading, but once the throbber stops, it disapears. The same thing happens if you change the call from the <script> block to <body onLoad>. It seems to be that for some reason the opened window gets redrawn or something and the text is wipped.
Moving to m16
Target Milestone: M15 → M16
Nominating nsbeta2. We have to start drawing a line on DOM0 backward compatibility; these bugs are supposed to be a high priority for nsbeta2 per the beta2 criteria.
Keywords: 4xp, nsbeta2
Setting to [nsbeta2+]. document.write() is one of the most widely-used JavaScript commands of all. Even across windows, you see it a fair amount.
Whiteboard: [nsbeta2+]
Taking this bug off Vidurs list.
Assignee: vidur → jst
Status: ASSIGNED → NEW
I have a fix for this in my tree, need to do some more testing before checking in.
Status: NEW → ASSIGNED
Whiteboard: [nsbeta2+] → [nsbeta2+][jst]
The fix for this is checked in, marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
No longer blocks: 17907
Verified with 2000-07-05-09.
Status: RESOLVED → VERIFIED
As shown in #56539, this bug should be reopened for m18-2000101014.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: