locked
I need Java script to call a DLL RRS feed

  • Question

  •  

    I need Java script to call a DLL,can any body Please give me the code
    Monday, July 7, 2008 9:13 AM

Answers

  • Here is the example code of calling an ActiveXObject which is a COM base dll:

    fun1(id,password)
    {
    var AutherizedUser;
    var ValidateObject = new ActiveXobject("InstallDLL.Install");
    ValidateObject.ValidateUser(id,password,Autherized User);
    return AutherizedUser;
    }

     

    From java script, you can only call a COM base DLL.  If you have a CLR base dll, you have two choices:

     

    1. You can create an Active X Object in .NET following this example: http://www.devhood.com/messages/message_view-2.aspx?thread_id=16569

     

    2. You could use an ASP.NET web service which is hosted by IIS which you can consume with your javascript code.  The web service can reference the dll just like any other .NET app could.  Then your javascript code could call that function.  This should work on pretty much any late javascript enabled browser.

    Monday, July 7, 2008 1:48 PM

All replies

  • Here is the example code of calling an ActiveXObject which is a COM base dll:

    fun1(id,password)
    {
    var AutherizedUser;
    var ValidateObject = new ActiveXobject("InstallDLL.Install");
    ValidateObject.ValidateUser(id,password,Autherized User);
    return AutherizedUser;
    }

     

    From java script, you can only call a COM base DLL.  If you have a CLR base dll, you have two choices:

     

    1. You can create an Active X Object in .NET following this example: http://www.devhood.com/messages/message_view-2.aspx?thread_id=16569

     

    2. You could use an ASP.NET web service which is hosted by IIS which you can consume with your javascript code.  The web service can reference the dll just like any other .NET app could.  Then your javascript code could call that function.  This should work on pretty much any late javascript enabled browser.

    Monday, July 7, 2008 1:48 PM
  •  

    hi Jude Lee,

     

                         thank you so much for giving me reply.

    Tuesday, July 8, 2008 4:41 AM