Closed
Bug 92557
Opened 25 years ago
Closed 25 years ago
Cannot get frame document object from javascript
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: vicentesalvador, Assigned: pollmann)
Details
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2+)
Gecko/20010724
BuildID: 2001072403
Getting from javascript frame document when the frameset has breen created by
javascript file returns null and not the document object.
This works on June nightly builds but I cannot determine when this has been broken
Reproducible: Always
Steps to Reproduce:
Ejecute the sample code atached
Actual Results: Returns null
Expected Results: The alert should show the document object and not null
<!-- test.html -->
<html>
<head>
<script TYPE='text/javascript' LANGUAGE='javascript1.2' SRC='jtab0.js'></SCRIPT>
</head>
<script TYPE='text/javascript' LANGUAGE='javascript1.2'>
BuildFrame()
</SCRIPT>
</html>
<!-- frame1.html -->
<html>
<head>
<script>
alert(parent.frames["HEAD"].document); // This returns null
</script>
</head>
<body>
hello world!!!
</body>
</html>
<!-- jtab0.js -->
function BuildFrame()
{
document.writeln("<FRAMESET ROWS='315,*' BORDER='0' MARGINHEIGHT=0 MARGINWIDTH=0
BORDERCOLOR='#FFFFFF'>");
document.writeln(" <FRAME SRC='javascript:\"<BODY BGCOLOR=#FFFFFF></BODY>\"'
NAME='HEAD'>");
document.writeln(" <FRAMESET COLS='50,*' BORDER='0' MARGINHEIGHT=1 MARGINWIDTH=1
BORDERCOLOR='#CCCCCC'>");
document.writeln(" <FRAME SRC='frame1.html' NAME='LEFT'>");
document.writeln(" <FRAME SRC='javascript:\"<BODY BGCOLOR=#FFFFFF></BODY>\"'
NAME='RIGHT'>");
document.writeln(" </FRAMESET>");
document.writeln("</FRAMESET>");
}
Comment 1•25 years ago
|
||
Eric, here's one more frame-doesn't-synhronously-load-a-document-on-construction
bug :-)
Assignee: jst → pollmann
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•25 years ago
|
||
confirmed ..is printing null
Comment 3•25 years ago
|
||
Comment 5•25 years ago
|
||
Marking as dup of bug 22681. Please reopen if you don't agree, thanks!
*** This bug has been marked as a duplicate of 22681 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Comment 6•25 years ago
|
||
Maybe I'm missing something, but I think bug 22681 is about iframes, not frames.
Comment 7•25 years ago
|
||
Frames and iframes are the same thing in mozilla, if there's a problem with one
the problem most likely exists in the other.
Comment 8•25 years ago
|
||
Ok.
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•