[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Copying contents of a frame to another
From:       Koos Vriezen <koos.vriezen () xs4all ! nl>
Date:       2002-01-18 11:18:26
[Download RAW message or body]

Hi,

There is a different rendering when using document.write or node.innerHTML
when using HTML from node.innerHTML:

<html><head><script>
KDEDIR="/usr/local/kde";
function writeFrames() {
    var icon = KDEDIR + "share/icons/hicolor/16x16/mimetypes/mime_empty.png";
    frame1.document.open();
    frame1.document.write("<html><body id='B1'><a href=\"javascript:window.alert
('Hi')\"><img border='0' height='20' src='" + icon + "'></a></body></html>");
    frame1.document.close();
    var body1 = frame1.document.getElementById("B1");
    frame2.document.open();
    frame2.document.write("<html><body id='B2'>");
    frame2.document.write(body1.innerHTML);
    frame2.document.write("</body></html>");
    frame2.document.close();
    var body2 = frame2.document.getElementById("B2");
    frame3.document.open();
    frame3.document.write("<html><body id='B3'></body></html>");
    frame3.document.close();
    var body3 = frame3.document.getElementById("B3");
    //body3.innerHTML = body1.innerHTML;
    body3.innerHTML = body2.innerHTML;
}
</script></head>
<frameset cols='100,100,*' onLoad='writeFrames()'>
 <frame name='frame1' src='about:blank'>
 <frame name='frame2' src='about:blank'>
 <frame name='frame3' src='about:blank'>
</frameset>
</html>

The second frame is rendered wrong. The combination
<a href=.. src=..><img border=.. height=..></a> seem to be the cause.

The only thing I found so far is that DocumentImpl::close doesn't do a
m_tokenizer->end() call (didn't help). Any ideas?

Regards,

Koos Vriezen

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic