I'm trying to use the DOM to write in a popped up window, like so:
<html>
<head>
<title>Test</title>
</head>
<body>
<script type="text/javascript">
var aWin=open( '', '_blank', 'width='+640+',height='+480+', resizable=0,scrollbars=0' );
var fragment=aWin.document.createDocumentFragment();
var head=fragment.appendChild( document.createElement('head') );
var e=head.appendChild( document.createElement('script') );
e.text="alert('hello, world!')";
aWin.document.documentElement.appendChild( fragment );
</script></body></html>
Netscape 6 and FireFox seem to handle it just fine, but Opera does
nothing and IE6 complains about 'no such interface' on the
fragment.appendChild line (or crashes outright!). I presume I'm doing
something wrong, but I have no idea what... Any help would be
appreciated.
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.