R
Remi Bastide
I'm trying to open a blank window and write a message in it.
The following page works as expected in IE, but in Firefox the message
is not written:
<HTML>
<HEAD>
<TITLE>Document.write bug</TITLE>
<Script Language="JavaScript">
function load() {
var w = window.open('','','');
w.document.open();
w.document.write('<html><body><h1>hello</h1></body></html>');
w.document.close();
}
</Script>
</HEAD>
<BODY>
<H1>Document.write bug</H1>
<a href="javascript:load()">Open Window</a>
</BODY>
</HTML>
I'm looking for the "cross-browser" way to achieve this effect.
Thanks for any hint.
The following page works as expected in IE, but in Firefox the message
is not written:
<HTML>
<HEAD>
<TITLE>Document.write bug</TITLE>
<Script Language="JavaScript">
function load() {
var w = window.open('','','');
w.document.open();
w.document.write('<html><body><h1>hello</h1></body></html>');
w.document.close();
}
</Script>
</HEAD>
<BODY>
<H1>Document.write bug</H1>
<a href="javascript:load()">Open Window</a>
</BODY>
</HTML>
I'm looking for the "cross-browser" way to achieve this effect.
Thanks for any hint.