I really need to be able to dynamically create HTC Behaviors on the fly.
This is fine when I use ie 6.0. but whenever I use IE 5.5 it crashes IE
everytime. Is there anyway around this problem. Example code below, I have
dumbed it down somewhat, but the problem persists the same.
:: helloworld.htm
<html>
<head>
<script language='jscript'>
var tsNS = document.namespaces.add("ts","helloworld.htc");
tsNS.doImport("helloworld.htc");
</script>
</head>
<body onload='Init();'>
<script language='jscript'>
function Init()
{
// This crashes IE5.5 everytime //
oElem = document.createElement("ts:HELLO_WORLD");
document.body.appendChild(oElem);
}
</script>
<1-- THIS WORKS FINE IN IE5.5 and IE6.0 -->
<ts:HELLO_WORLD />
</body>
</html>
:: helloworld.htc
<HEAD>
<public:component tagName='HELLO_WORLD' >
<public:defaults viewLinkContent="true" />
</public:component>
</HEAD>
<BODY>SIMPLE HELLO</BODY>