Does anyone know how I can call a function in a VB.NET DLL from Java script
code?
Thanks. 7 6389
* "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/>
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/>
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
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
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
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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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,...
|
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...
| |