[Javascript] Call an external program?

Steve Clay sclay at ufl.edu
Thu Apr 27 10:50:23 CDT 2006


Thursday, April 27, 2006, 10:29:02 AM, Miles Thompson wrote:
> I sort of think it could be done with a Java applet, and the applet could
> watch the combo box for the change and make the call, but I'm not sure.

Put the combo box /in/ the Java applet. Now all you need to do is have the
user install the applet as trusted and figure out how to call the app
within Java.

Other non-Java options:

Depending on the browser you may be able to force it to handle a custom
content-type/protocol with a certain application. Then you'd just have to
make a server-side script send your content-type or dynamically create a
link using your protocol and call it.

I've also experimented with registering a custom protocol in Windows which
can receive data from the browser and call a program. You install Windows
Script Host & Runtime and run a small JScript file which registers itself
as a custom protocol handler in the registry. Then when you click a link
like "myprotocol:data", "date" is passed to the JScript file as
WScript.Arguments(0). 

I can send you an example JScript file if you wish.

Steve
-- 
http://mrclay.org/




More information about the Javascript mailing list