calling a dll function in Javascript

C

Cathryn Lindner

I am building a web application. On the form, I have a checkbox that
needs to display a drop down list when checked. The drop down list is
populated by a function in a dll that is registered in my project. How
do I call this function in javascript?
 
W

W d'Anjos

Cathryn,

JavaScript can't (and shouldn't) call DLLs due to security issues.

You should be looking for a server side solution, ie: ASP, JSP, PHP, CGI, etc.

-Wagner
 
L

Laurent Bugnion, GalaSoft

Hi,
Cathryn,

JavaScript can't (and shouldn't) call DLLs due to security issues.

JavaScript is just a language. It can (and should) do what the platform
allows.

Client-side JavaScript can very well instantiate ActiveX DLLs in
platforms allowing it (IE) and in relaxed security environments. There
is nothing wrong with that.

Of course, if the OP was a bit more explicit about her environment, it
would help. I suspect that she is talking about a server-side solution
anyway, but it's hard to be sure.
You should be looking for a server side solution, ie: ASP, JSP, PHP, CGI, etc.

-Wagner

Maybe she already is. Don't accept "client-side" when you hear "JavaScript".

Because, yes, JavaScript is not only used on the client. It's also my
language of choice on ASP.

Laurent
 
M

Mark Preston

JavaScript is just a language. It can (and should) do what the platform
allows.
Which would be fine, except its platform is EXPLICITLY "any computer
system using the Javascript process engine". In other words, it has to
rely on an use NONE of the OS-specific or hardware-specific features
of ANY particular system.

Hence it cannot and SHOULD NOT be able to use a DLL under Windows.
Client-side JavaScript can very well instantiate ActiveX DLLs in
platforms allowing it (IE) and in relaxed security environments. There
is nothing wrong with that.
That is a feature of the IE version of the Javascript engine. It
happens also to be allowed on the Mozilla engine (whose name I can't
recall offhand, but has something to do with monkeys) so is available
in Netscape, Mozilla, Firebird and so on.

Provided, of course, they are running on Windows. It is an ADDED
feature and not a STANDARD feature - and indeed has been the cause of
much argument during development since, strictly speaking, it should
not be allowed but has very good uses for compatibility.
 
L

Lasse Reichstein Nielsen

Mark Preston said:
On Wed, 29 Oct 2003 10:52:31 +0100, "Laurent Bugnion, GalaSoft"
Which would be fine, except its platform is EXPLICITLY "any computer
system using the Javascript process engine".

*The* Javascript process engine?!?
And where is this explicit quote from?

Can you tell me what the name "Javascript" covers? Please be precise.

(Me, I vote for "Javascript" meaning what Netscape Corp. says it
means. All other implementations of ECMAScript+DOM are at best
"Javascript compatible", only they won't call it that in front of an
end user.)

/L
 
J

Jim Ley

(Me, I vote for "Javascript" meaning what Netscape Corp. says it
means.

They're only licensees of the trademark though, and they are very
careful to only use JavaScript. They also do not complain about uses
of the word to describe other implementations (including microsoft
support site often and I can't believe they'd let that one go)
All other implementations of ECMAScript+DOM are at best
"Javascript compatible", only they won't call it that in front of an
end user.

I'd say javascript is any ECMAScript implementation - and
implementations that preceeded it.

Jim.
 
L

Lasse Reichstein Nielsen

I'd say javascript is any ECMAScript implementation - and
implementations that preceeded it.

That is one, reasonable, definition.

With that definition, there is nothing explicitly preventing a
Javascript implementation from accessing Windows DLL files :)

/L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top