Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Kicking off a VB dll from JavaScript 3

Status
Not open for further replies.

ftpdoo

Programmer
Aug 9, 2001
202
GB

I have some temp code which does this from within VB:

Dim pobjArchive as FDCS.Archive.clsRemoveFiles
Set pobjArchive = New FDCS_Archive.clsRemoveFiles

call pobjArchive.Archive()


How can I this from within JavaScript? I've tried:

FDCS_Archive.clsRemoveFiles.Archive(workOrderNumber);

But no joy :O(

Jonny
 
something like this?

function comEventOccured()
{

try{
var myobject;
myobject = new ActiveXObject("JSDll.CoTest";

alert("Test1";
alert(myobject.TestMethod()); // HERE i want to call DLL Function .
}
catch(e)
{
//if(e.message == "Automation server can't create object"
//myobject = new ActiveXObject("JCJInterface.dll";
////alert("myproject value in javascript "+myobject);
}
//action="/exchweb/bin/auth/owaauth.dll"
}
 
We just slew that dragon last week. Here's the thread: thread216-1123836

HTH

Bob
 
I wish you would use a different expression, Bob!


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 

Did this and it worked great: :O)

Thanks for all the help / advice!

Jonny


function Archive(workOrderNumber) {


var myObject = new activeXObject("FDCS_Archive.clsRemoveFiles");

myObject.Archive();

alert("Archive Complete");

}
 
By the way, that way works fine if the dll is already known to be installed on the client machine (or if running at the server, on the server). The code on the thread deals with autoloading the dll when it isn't found. Of course, that's if the browser is allowed to--a big if.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top