Object Doesn't not support property or Method Error in Javascript
<p>I have developed OCX.dll in C# (FW 2.0 with Windowss 7 64 bit OS) with the help of following link 
<a href="http://www.codeproject.com/Articles/24089/Create-ActiveX-in-NET-Step-by-Step?fid=1073139&amp;df=90&amp;mpp=25&amp;sort=Position&amp;spc=Relaxed&amp;tid=5135502" rel="nofollow">here</a></p>

<p>and for registering the OCX.dll, I have copied the OCX.dll into windows/Syswow64 folder since my pC is 64 bit and opened the cmd prompt with admin rights and typed following commands there </p>

<pre><code>C:\windows\Microsoft.Net\Framwork64\v2.XXXXX\Regasm /codebase /tlb “C:\windows\SysWOW64\OCXCtrl.dll”
</code></pre>

<p>and prompt the registered messagebox and i opened the Regedit.exe and search about the classsID and is Its  present there.</p>

<p>I have written sample html code and inside that calling the OCX method using Javascript as like below.</p>

<pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;WebForm1&lt;/title&gt;
    &lt;meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"&gt;
    &lt;meta name="CODE_LANGUAGE" Content="C#"&gt;
    &lt;meta name=vs_defaultClientScript content="JavaScript"&gt;
    &lt;meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5"&gt;
  &lt;/head&gt;
  &lt;body onload="OpenActiveX()"&gt;

  &lt;!-- Our activeX object --&gt;
  &lt;OBJECT id="OurActiveX" name=”OurActiveX" classid="clsid:121C3E0E-DC6E-45dc-952B-A6617F0FAA32" VIEWASTEXT codebase="OurActiveX.cab"&gt;&lt;/OBJECT&gt; 

  &lt;!-- Attaching to an ActiveX event--&gt;
&lt;script language="javascript"&gt;
           function OurActiveX::OnClose(redirectionUrl)
       {
        alert(redirectionUrl);   
                    //window.location = redirectionUrl;
           }
&lt;/script&gt;


&lt;script language="javascript"&gt;
    //Passing parameters to ActiveX object and starting application
function OpenActiveX()
{
    try
    {
        document.OurActiveX.MyParam = "Hi I am here." //Passing parameter to the ActiveX
        alert("1");
        document.OurActiveX.Open(); //Running method from activeX
    }
    catch(Err)
    {
        alert("Error "+Err.description);
    }
}   
</code></pre>

<p>when i run the html code in IE 8.0 then i am getting  following Error</p>

<blockquote>
  <p>Object Doesn't not support  property  or Method 'Open'</p>
</blockquote>

<p>i dont know Whats wrong with my above code.</p>

<p>Please provide the solutions for the above</p>

<p>Thanks in advance</p>