A question on "innerHTML" .
Hi,
The below is my HTML code.
ActiveX function "GetData()" returns HTML string which may include javascript codes.
This HTML string may be HTML codes in any pages which I will navigate to.
The result of the below code is not what I expected.
Error occurred in the line "divEncId.inner HTML=enc;".
And, the IE browser displays white page.
But, some pages are displayed well.
What is the problem in my code?
Someone said that the "innerHTML" is not used on the HTML string which includes javascript code. Is it right?
I appreciates who help me.
[HTML]<html>
<head>
<script language="javas cript">
function doJob()
{
var enc = document.aObj.G etData("...");
var divEncId = self.document.g etElementById(" divEnc");
// Just for debug : I confirmed the below 2 values is no problem.
alert(enc);
alert(divEncId. innerHTML);
divEncId.innerH TML=enc;
}
</script>
</head>
<body onload="javascr ipt:doJob();">
<div id="divEnc">Con tent</div>
<object id="aObj" classid="CLSID: ..." codebase="/ActivexObj.cab# Version=..." width=... height=...></object>
</body>
</html>[/HTML]