R
Russ
Hi All,
I have a problem getting the following simple example
of "document.write" creating a script on the fly
to work in all html browsers.
It works in I.E., Firefox, and Netscape 7 above.
It doesn't seem to work in Netscape 4. Am I missing
something with it? When I look at page source in
Netscape 4 the script isn't even shown.
Can Netscape 4 create scripts on the fly at all?
thanx
Russ Kinter
<HTML>
<HEAD>
<script language="javascript">
function loadBrowser() {
var aStr = '<HTML>';
aStr += '<HTML>';
aStr += '<HEAD>';
aStr += '<SCRIPT language ="JavaScript">';
aStr += 'function vrmlHTML(){ ';
aStr += 'resizeTo(400,300);';
aStr += 'moveTo(0,0); }';
aStr += '<\/SCRIPT>';
aStr += ' <\/HEAD>';
aStr += ' <BODY onload="vrmlHTML()">';
aStr += '<\/BODY >';
aStr += '<\/HTML>';
document.open();
document.write(aStr);
document.close();
}
</SCRIPT>
</HEAD>
<BODY onload="loadBrowser()">
</BODY>
</HTML>
I have a problem getting the following simple example
of "document.write" creating a script on the fly
to work in all html browsers.
It works in I.E., Firefox, and Netscape 7 above.
It doesn't seem to work in Netscape 4. Am I missing
something with it? When I look at page source in
Netscape 4 the script isn't even shown.
Can Netscape 4 create scripts on the fly at all?
thanx
Russ Kinter
<HTML>
<HEAD>
<script language="javascript">
function loadBrowser() {
var aStr = '<HTML>';
aStr += '<HTML>';
aStr += '<HEAD>';
aStr += '<SCRIPT language ="JavaScript">';
aStr += 'function vrmlHTML(){ ';
aStr += 'resizeTo(400,300);';
aStr += 'moveTo(0,0); }';
aStr += '<\/SCRIPT>';
aStr += ' <\/HEAD>';
aStr += ' <BODY onload="vrmlHTML()">';
aStr += '<\/BODY >';
aStr += '<\/HTML>';
document.open();
document.write(aStr);
document.close();
}
</SCRIPT>
</HEAD>
<BODY onload="loadBrowser()">
</BODY>
</HTML>