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,scr ollbars=0' );
var fragment=aWin.d ocument.createD ocumentFragment ();
var head=fragment.a ppendChild( document.create Element('head') );
var e=head.appendCh ild( document.create Element('script ') );
e.text="alert(' hello, world!')";
aWin.document.d ocumentElement. 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.append Child 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)cybers pace.org | don't, I need to know. Flames welcome.
<html>
<head>
<title>Test</title>
</head>
<body>
<script type="text/javascript">
var aWin=open( '', '_blank', 'width='+640+', height='+480+', resizable=0,scr ollbars=0' );
var fragment=aWin.d ocument.createD ocumentFragment ();
var head=fragment.a ppendChild( document.create Element('head') );
var e=head.appendCh ild( document.create Element('script ') );
e.text="alert(' hello, world!')";
aWin.document.d ocumentElement. 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.append Child 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)cybers pace.org | don't, I need to know. Flames welcome.
Comment