Last Comment Bug 212670 - <iframe></iframe> works every time, <iframe/> only once a page.
: <iframe></iframe> works every time, <iframe/> only once a page.
Status: RESOLVED DUPLICATE of bug 158667
:
Product: Core
Classification: Components
Component: Layout: Images, Video, and HTML Frames (show other bugs)
: Trunk
: x86 Windows 2000
-- normal (vote)
: ---
Assigned To: layout.html-frames
: Madhur Bhatia
: Sean Voisen (:svoisen)
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-14 11:07 PDT by Michael Hartle
Modified: 2018-08-29 15:22 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Test case showing the same example page using <iframe/> and <iframe></iframe> (2.24 KB, application/octet-stream)
2003-07-14 11:08 PDT, Michael Hartle
no flags Details

Description User image Michael Hartle 2003-07-14 11:07:26 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624

During development I found out that using <iframe src="somepage.html"/> only
works  once per page; in the attached example, using <iframe/> at a certain
point in a page leads to the rest of the page not being displayed. When using
<iframe></iframe> instead, it works like a charm (so far) :-)

Reproducible: Always

Steps to Reproduce:
1. Use <iframe/> self-closing tag instead of <iframe></iframe> tag pair in a page.

Actual Results:  
The rest of the page after the <iframe/> tag is not displayed, at least not in
the attached example provided.

Expected Results:  
<iframe/> should behave like <iframe></iframe> - at least according to my
understanding, but I may be wrong.
Comment 1 User image Michael Hartle 2003-07-14 11:08:52 PDT
Created attachment 127741 [details]
Test case showing the same example page using <iframe/> and <iframe></iframe>
Comment 2 User image Josh Birnbaum 2003-07-14 11:23:37 PDT
This is invalid.  You can't use XML syntax in HTML.  While <iframe/> is
self-closing in XML, in HTML the "/" is just an unknown attribute that is
ignored (which is why you usually add a space for compatability reasons, <iframe
/>).

I took your testcase, converted it to XHTML, and it works as expected.

See also http://www.w3.org/TR/xhtml1/#guidelines

*** This bug has been marked as a duplicate of 158667 ***
Comment 3 User image Josh Birnbaum 2003-07-14 11:37:28 PDT
>You can't use XML syntax in HTML.
Er, I should say, you can't always use XML syntax in HTML.  The link I gave, for
the XHTML spec Appendix C, gives the rules for writing XHTML that can be
processed as HTML successfully.

Note You need to log in before you can comment on or make changes to this bug.