Closed
Bug 35250
Opened 24 years ago
Closed 23 years ago
Creating <IFRAME SRC="about:blank"> and document.writing to it fails [frame]
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
Future
People
(Reporter: martin.honnen, Assigned: alexsavulov)
Details
(Keywords: dom1)
Attachments
(1 file)
869 bytes,
text/html
|
Details |
I am creating a blank iframe and then try to document.write to it. I get an error that the iframe's document has no properties. If I use setTimeout with a one millisecond delay it works but I can't quite believe that that (incredible small) delay is necessary to access the document and hope it is possible to make it immediately available. <HTML> <HEAD> <SCRIPT> var n = -1; function createBlankIframe () { n++; var iframe = document.createElement('IFRAME'); iframe.id = iframe.name = 'iframe' + n; iframe.src = 'about:blank'; document.body.appendChild(iframe); } function writeToIframe() { var ifrWin = window.frames['iframe' + n]; ifrWin.document.open(); ifrWin.document.write('<H1>Kibology<\/H1>'); ifrWin.document.close(); } </SCRIPT> </HEAD> <BODY> <BUTTON ONCLICK="createBlankIframe(); writeToIframe();"> create blank iframe and write to it </BUTTON> <BUTTON ONCLICK="createBlankIframe();"> create blank iframe </BUTTON> <BUTTON ONCLICK="writeToIframe()"> write to iframe </BUTTON> <BUTTON ONCLICK="createBlankIframe(); setTimeout('writeToIframe();', 1)"> create blank iframe and write delayed to it </BUTTON> <BR> </BODY> </HTML>
Reporter | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
I think this is really a dup of bug #17351, that bug is about the same problem but that bug uses window.open(...) in stead if <iframe src="...">, I'll leave this open to track that this is fixed when #17351 is fixed...
Status: NEW → ASSIGNED
Updated•24 years ago
|
Target Milestone: --- → M19
Comment 3•24 years ago
|
||
NS 4 look better whitout this thing now it looks like IE
Comment 4•24 years ago
|
||
Bug #17351 is marked fixed, but that doesn't seem to be affecting this bug. I still get null as the document property of an iframe with no src.
Comment 5•24 years ago
|
||
Reassigning to Eric Pollmann since we talked about this and we had some ideas on how to solve this, Eric, feel free to either dupe this against one of the other bugs on the same issue or Future this, or whatever...
Assignee: jst → pollmann
Status: ASSIGNED → NEW
OS: Windows 98 → All
Hardware: PC → All
Comment 6•24 years ago
|
||
This bug has been marked "future" because the original netscape engineer working on this is over-burdened. If you feel this is an error, that you or another known resource will be working on this bug,or if it blocks your work in some way -- please attach your concern to the bug for reconsideration.
Status: NEW → ASSIGNED
Target Milestone: M19 → Future
Comment 9•23 years ago
|
||
Is this why the LinuxToday page renders incorrectly? <http://linuxtoday.com> Note the long gray box on the left, which is, in fact, an IFRAME in which the SRC attribute resolves to a piece of Javascript code. If this appears to be a different bug, i will post a new bug and write a minimal test case. It seems that this page rendered correctly a few months ago.
Comment 10•23 years ago
|
||
I believe Jesse was right back in november, this is most likely a dup of bug 22681.
Comment 11•23 years ago
|
||
Bulk reassigning form bugs to Alex
Assignee: pollmann → alexsavulov
Status: ASSIGNED → NEW
Assignee | ||
Updated•23 years ago
|
Summary: Creating <IFRAME SRC="about:blank"> and document.writing to it fails → Creating <IFRAME SRC="about:blank"> and document.writing to it fails [frame]
Comment 12•23 years ago
|
||
Does this still happen? If not, it was probably a dup of (fixed) bug 22681.
Reporter | ||
Comment 13•23 years ago
|
||
The test case http://bugzilla.mozilla.org/attachment.cgi?id=7397&action=view works for me with M 0.9.7. I resolve as duplicate of 22681 *** This bug has been marked as a duplicate of 22681 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Comment 14•23 years ago
|
||
no, this bug cannot be marked dup of bug 22681, because bug 22681 was resolved as dup of this bug.
Comment 15•23 years ago
|
||
I have some trouble understanding your logic on this one, Sivakiran :-) bug 22681 was never marked as a dup of this one as far as I can tell, and bug 22681 is fixed (apart from an edge case which is why the bug is still open)
Comment 16•23 years ago
|
||
this is a dupe of bug 22681, did not i say so before :-)
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•