title: Call DLL methods from Javascript
body: <p>I want to call a methods of a dll from javascript.</p>
  
  <p>I followed this article <a href="http://www.dreamincode.net/forums/topic/38890-activex-with-c#/" rel="noreferrer">Creating activex objects with c#</a></p>
  
  <p>Since activeX works in IE only, how should I be able to call those methods from javascript in FireFox or Chrome?</p>
  
  <p>I am already having an application which uses ActiveX object to call Dll Methods, but it works in IE only.</p>
  
  <p>Is there any possible way that will make my application browser Independent?</p>
  
  <p><strong>UPDATED</strong></p>
  
  <p>I used Jquery async AJAX and webservice to call dll methods:</p>
  
  <pre><code>var to_return = $.ajax({
           type: "POST",
           url: "Default.aspx/CallMe", //CallMe is WebService method
           data: "{}", // parameter to pass
           async: false,
           contentType: "application/json; charset=utf-8",
           dataType: "json",
       });
  
       alert(to_return.responseText);
  </code></pre>
  
  <p>If <strong>CallMe()</strong> returns a string it is alerting it as <strong>{"d":"True"}</strong> where "True" is the string returned from CallMe.</p>
  
  <p>How will I able to get only returned string from it?</p>
  
  <p>Also, if <strong>CallMe()</strong> method of webservice returns an Object of a class present in that DLL?
  How can I retrieve that object in JavaScript?  and
  Will I be able to call methods of that class using that returned object?</p>
  
  <p>Please Help.</p>