Crash on accessing a frame
Koos Vriezen
koos.vriezen at xs4all.nl
Sat Aug 10 13:53:54 BST 2002
Hi,
Consider these two html pages:
<HTML><HEAD><SCRIPT>
function loaded() {
myframe1.document.open();
myframe1.document.write("<html><frameset>");
myframe1.document.write("<frame name='frame1' src='frame.html'>");
myframe1.document.write("<frame name='frame2' src='about:blank'>");
myframe1.document.write("</frameset></html>");
myframe1.document.close();
}
</SCRIPT> </HEAD>
<FRAMESET ROWS="100,*" onLoad="loaded()">
<FRAME NAME="myframe1" SRC="about:blank">
</FRAMESET></HTML>
With frame.html being:
<HTML><HEAD><SCRIPT>
function loaded() {
var doc = parent.frame2.document;
doc.open();
doc.write("<HTML><BODY>Hi</BODY></HTML>");
doc.close();
}
</SCRIPT></HEAD>
<BODY onLoad="loaded()"></BODY></HTML>
IMO this is asking for trouble, but khtml also crashes on this. It even
crashes if onLoad in frame.html is set to "setTimeout('loaded()', 5000)".
Regards,
Koos Vriezen
More information about the kfm-devel
mailing list