473,394 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Calling VB.NET DLL from Java script

Does anyone know how I can call a function in a VB.NET DLL from Java script
code?

Thanks.
Nov 20 '05 #1
7 6389
Hi David,

Before you spend to much time with it?

Did you see this page,

http://msdn.microsoft.com/security/d...p2websites.asp

I hope this saves you some work?

Cor

Does anyone know how I can call a function in a VB.NET DLL from Java script
code?

Thanks.

Nov 20 '05 #2
* "David Schwartz" <da**@hr-symphony.com> scripsit:
Does anyone know how I can call a function in a VB.NET DLL from Java script
code?


Are you referring to a Webpage + JavaScript or a locally "installed"
Jcript?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
I guess it would be "locally installed" JScript. (Forgive me as I'm a
complete neophyte when it comes to JScript). Here's what I'm trying to do
exactly: I'm using Adobe Acrobat and putting code into a button on my PDF
form. Acrobat allows me to put JScript code into the events for the button.
However, I would really like to call some of my VB.NET code rather than
write everything in JScript (partly because I don't know JScript, and also
because there's quite a lot that I need to do when the button is clicked,
including some database access, which I'm not sure if I can even do in
JScript).

Thanks for any help,
Dave

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2i************@uni-berlin.de...
* "David Schwartz" <da**@hr-symphony.com> scripsit:
Does anyone know how I can call a function in a VB.NET DLL from Java script code?


Are you referring to a Webpage + JavaScript or a locally "installed"
Jcript?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #4
Hi David,

Than you can probably try this,
function executeCommands(inputparms)
{
var oShell = new ActiveXObject("Shell.Application");
var commandtoRun = "C:\\Winnt\\Notepad.exe";
if (inputparms != "")
{
var commandParms = document.Form1.filename.value;
}
oShell.ShellExecute(commandtoRun, commandParms,
"", "open", "1");
}
I got it from this page
http://www.midrangeserver.com/mpo/mp...2-story01.html

I hope this helps?

Cor

Nov 20 '05 #5
Hmm, I tried putting that code into my button in Acrobat. When I click the
button, I get the following error box:

Acrobat Database Connectivity Built-in Functions Version 5.0
Acrobat EScript Built-in Functions Version 5.0
Acrobat Annotations / Collaboration Built-in Functions Version 5.0

ReferenceError: ActiveXObject is not defined
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
Hi David,

Than you can probably try this,
function executeCommands(inputparms)
{
var oShell = new ActiveXObject("Shell.Application");
var commandtoRun = "C:\\Winnt\\Notepad.exe";
if (inputparms != "")
{
var commandParms = document.Form1.filename.value;
}
oShell.ShellExecute(commandtoRun, commandParms,
"", "open", "1");
}
I got it from this page
http://www.midrangeserver.com/mpo/mp...2-story01.html

I hope this helps?

Cor

Nov 20 '05 #6
OR

You could write your own DLL and then call it from JScript, I havent tried
it myself, but Ive seen someone post that they sucessfully managed to do
this.

OHM

"David Schwartz" <da**@hr-symphony.com> wrote in message
news:Oe**************@TK2MSFTNGP10.phx.gbl...
Hmm, I tried putting that code into my button in Acrobat. When I click the button, I get the following error box:

Acrobat Database Connectivity Built-in Functions Version 5.0
Acrobat EScript Built-in Functions Version 5.0
Acrobat Annotations / Collaboration Built-in Functions Version 5.0

ReferenceError: ActiveXObject is not defined
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
Hi David,

Than you can probably try this,
function executeCommands(inputparms)
{
var oShell = new ActiveXObject("Shell.Application");
var commandtoRun = "C:\\Winnt\\Notepad.exe";
if (inputparms != "")
{
var commandParms = document.Form1.filename.value;
}
oShell.ShellExecute(commandtoRun, commandParms,
"", "open", "1");
}
I got it from this page
http://www.midrangeserver.com/mpo/mp...2-story01.html

I hope this helps?

Cor


Nov 20 '05 #7
That is exactly what I want to do (write my own DLL and call it from
JScript). So far this doesn't seem possible from within Acrobat.

"One Handed Man ( OHM#)" <news.microsoft.com> wrote in message
news:ud**************@TK2MSFTNGP11.phx.gbl...
OR

You could write your own DLL and then call it from JScript, I havent tried
it myself, but Ive seen someone post that they sucessfully managed to do
this.

OHM

"David Schwartz" <da**@hr-symphony.com> wrote in message
news:Oe**************@TK2MSFTNGP10.phx.gbl...
Hmm, I tried putting that code into my button in Acrobat. When I click

the
button, I get the following error box:

Acrobat Database Connectivity Built-in Functions Version 5.0
Acrobat EScript Built-in Functions Version 5.0
Acrobat Annotations / Collaboration Built-in Functions Version 5.0

ReferenceError: ActiveXObject is not defined
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
Hi David,

Than you can probably try this,
function executeCommands(inputparms)
{
var oShell = new ActiveXObject("Shell.Application");
var commandtoRun = "C:\\Winnt\\Notepad.exe";
if (inputparms != "")
{
var commandParms = document.Form1.filename.value;
}
oShell.ShellExecute(commandtoRun, commandParms,
"", "open", "1");
}
I got it from this page
http://www.midrangeserver.com/mpo/mp...2-story01.html

I hope this helps?

Cor



Nov 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: StealthMonkey | last post by:
Let me prefix this by saying that I know next to nothing about Java (so please try to keep explainations simple). I use PHP for my server-side web programming. Here is my dilemma: I need a...
1
by: Raja | last post by:
I have a java class thats trying to call something in python. This works fine when i do a jythonc on the python script. When i call another python script from the __init__ of my called python...
2
by: Eyal | last post by:
Hey, I would appriciate if anyone can help on this one: I have a java object/inteface having a method with a boolean parameter. As I'm trying to call this method from a javascript it fails on...
3
by: Rajesh | last post by:
Hi, I am using iplanet webserver 4.1. I want to call a java class from ssjs file. But I am not getting the result. I have created a java class file and put it in the folder...
1
by: wolfv | last post by:
How can I call a java-script function from an .html page when the function is in a .js page? For now the java-script function is placed at the top of the .html page, but I want to move the java...
1
by: Vinodsrvk | last post by:
I am calling one validation function from the java script, that validation function will validate all the controls and return true/ false in the calling function I would like to check the return...
1
by: houh | last post by:
I have a java app that generates openoffice docs. When I run the java app in a shell script, as: export JAVA_HOME=/opt/corp/projects/metrics/Java/jdk1.5.0_07/bin/java export...
4
by: Quill_Patricia | last post by:
I have a Python script which is used to load data into a database. Up to now this script has been run by customers from the Windows command prompt using "python edg_loader.pyc". Any error messages...
4
by: raghuvendra | last post by:
Hi I have a jsp page with 4 columns: namely Category name , Category order, Input field and a submit button. All these are aligned in a row. And Each Category Name has its corresponding Category...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.