Closed Bug 109865 Opened 24 years ago Closed 4 years ago

document.location.href=... breaks document.write()

Categories

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

defect

Tracking

()

RESOLVED INACTIVE

People

(Reporter: galfandary, Unassigned)

References

()

Details

Attachments

(1 file)

In the frame on the left the second line is missing probably because of the location change to the other frame. Works fine with IE.
Not JS engine. This works fine for me. I see both lines. Please try a recent build (and _always_ list your build ID in bug reports!).
Assignee: rogerl → jst
Component: Javascript Engine → DOM Level 0
QA Contact: pschwartau → amar
2001111109 Linux. I saw both lines once, but the other four times I tried it I only saw the first line.
I see only "Line 1" on the left side of the divider. Build ID: 2001 11 11 09 / RH Linux 7.2
Confirming with win2k build 20011111.. I can see only 1 line
Status: UNCONFIRMED → NEW
Ever confirmed: true
Sometimes I see "Line 1" "Line 2", but sometimes only "Line 1". Whenever I fail to see the second line, the following error appears in the JavaScript Console: Error: top.contentFrame.f2.document has no properties Source File: http://mywebpage.netscape.com/tomalfandary/write/write.htm Line: 5 This line is indicated below: <html> <body> <script> document.write("Line 1<br>"); top.contentFrame.f2.document.location.href="dummy.htm"; <<<<<<<<<<<<<<<<<<<<< document.write("Line 2<br>"); </script> </body> </html>
So... let me get this straight. Any time the page load order is such that the frame on the left tries to write to the frame on the right when the frame on the right has no document, we see this? The fact that we stop script execution on an exception like this is not a bug... checking for a non-null document before using it or putting a try {} catch {} about code like this seem to be the responsibility of the script writer to me...
Well, true, but this works in NS4x and IE...
Attached file Single frame case
This attachment is closer to the real problem I have. If you open it in Mozilla you see only the second line. The browser I use identifies the load request as dummy and aborts. I only see the first line. In IE I see both. I'll try to arrange an exact replica using only JavaScript.
Mass-reassigning bugs to dom_bugs@netscape.com
Assignee: jst → dom_bugs
Assignee: general → nobody
QA Contact: amar → general
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: