R
RichardL
The following script from http://msdn2.microsoft.com/en-us/library/ms533897.aspx
runs fine in HTML-Kit 1.0.0.292 and IE 7.0, but not in Firefox
2.0.0.4.
In Firefox, it opens a blank page, but does not present the "Click
Me" button. I suspected the "DEFER" attribute might be a Microsoft-
only invention, but removing it did not improve the situation.
Any ideas?
<head>
<title>EmbeddingScriptExample</title>
<script type="text/javascript">
function insertScript(){
var sHTML="<input type=button onclick=" + "go2()" + "
value='Click Me'><BR>";
var sScript="<SCRIPT DEFER>";
sScript = sScript + "function go2(){ alert('Hello from
inserted script.') }";
sScript = sScript + "</SCRIPT" + ">";
ScriptDiv.innerHTML = sHTML + sScript;
}
</script>
</head>
<body onload="insertScript();">
<DIV ID="ScriptDiv"></DIV>
</body>
runs fine in HTML-Kit 1.0.0.292 and IE 7.0, but not in Firefox
2.0.0.4.
In Firefox, it opens a blank page, but does not present the "Click
Me" button. I suspected the "DEFER" attribute might be a Microsoft-
only invention, but removing it did not improve the situation.
Any ideas?
<head>
<title>EmbeddingScriptExample</title>
<script type="text/javascript">
function insertScript(){
var sHTML="<input type=button onclick=" + "go2()" + "
value='Click Me'><BR>";
var sScript="<SCRIPT DEFER>";
sScript = sScript + "function go2(){ alert('Hello from
inserted script.') }";
sScript = sScript + "</SCRIPT" + ">";
ScriptDiv.innerHTML = sHTML + sScript;
}
</script>
</head>
<body onload="insertScript();">
<DIV ID="ScriptDiv"></DIV>
</body>