Inserting IFrame before end of BODY with DHTML leads to loosing CSS info...

RESOLVED INCOMPLETE

Status

SeaMonkey
General
RESOLVED INCOMPLETE
12 years ago
10 years ago

People

(Reporter: fhangor, Unassigned)

Tracking

1.8 Branch
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050702
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050702

Adding IFRAME via DTHML at the end of a BODY and writing into it with open(), write(), close() leads to loosing CSS which is included in the writing...

Will be only shown right if you insert an alert before writing into the IFRAME.

Reproducible: Always

Steps to Reproduce:
Inserting a new IFRAME with

var sHtml = '<IFRAME id="menu' + oMenu.id + '" name="menu' + oMenu.id + '" class="popupmenu" src="" scrolling="no" marginwidth="0px" marginheight="0px" frameborder=0>';
sHtml += '</IFRAME>';

var range = document.createRange();
range.setStartAfter( el.lastChild );
var docFrag = range.createContextualFragment( sHtml );
el.appendChild( docFrag );

and adding htmlcode to IFRAME via

var el = document.getElementById( sId );
var eFrame = el.contentDocument;
eFrame.open();
eFrame.write( sHtml );
eFrame.close();

leads to loosing of CSS loaded in htmlcode

<LINK HREF="position of css" type="text/css" rel="stylesheet">

I hope that this description is detailed enough.

Actual Results:  
Wrong formatation of HTML code in IFRAME. 

Expected Results:  
Right display of htmlcode in the IFRAME.

Comment 1

12 years ago
can you attach an HTML testcase (Create a New Attachment)?
Version: unspecified → 1.8 Branch

Comment 2

10 years ago
no response => INCOMPLETE
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.