Closed
Bug 190940
Opened 22 years ago
Closed 22 years ago
Unable to traverse using DOM into IFRAME documents
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: andreas, Assigned: jst)
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212 There are two test files test.html and test1.html: test.html: <html> <script language="Javascript"> function test() { var el = document.getElementById('haufeindex').document.getElementById('result'); alert(el); } </script> <body> <iframe src="test1.html" width="100" height="50" border="0" name="haufeindex" id="haufeindex" > </iframe> <a href="javascript: test()">click me</a> </body> </html> test1.html: <html> <body> <div id="result" name="result">This sucks </div> </body> </html> Inside the Javascript methode I am trying to get the DIV 'result' from test1.html. However this is not possible because document.getElementById('haufeindex').document is undefined. However this should be defined Reproducible: Always Steps to Reproduce: 1. 2. 3. Expected Results: Mozilla should return a reference to the DIV element.
Comment 3•22 years ago
|
||
> document.getElementById('haufeindex').document is undefined. However this should > be defined No, it should not. document.getElementById('haufeindex').contentDocument should be -- see http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-50708718
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
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
•