I have next code in my website. This code is an c# activex, the function alert(MyCC.GetID().Fullname) works but events not work. What i doing wrong?
<object id="MyCC" codebase="http://localhost:3239/WebDAVCab.CAB"
classid="clsid:5F9A5DDB-0D35-4893-A9ED-1FAFFE94373A" width="80" height="120" VIEWASTEXT>
</object>
<script type="text/javascript">
MyCC = document.getElementById("MyCC");
alert(MyCC.GetID().Fullname);
MyCC.CardInserted = OnCardInserted;
MyCC.CardRemoved = OnCardRemoved;
function OnCardInserted()
{
alert("raised");
}
function OnCardRemoved()
{
alert("raised2");
}
</script>