How to launch an application with JavaScript |
| Software - Tweaks | |
| Written by Michael D. | |
|
Insert the code bellow in the <body> of your HTML file.
<SCRIPT Language="JScript">
It creates a function that can be launched from a link for example in your HTML code (in our case runcmd). This will run the File variable that must be set - i used cmd.exe in my example. If it's not a system command, enter it using full path (C:\\FOLDER\\SUBFOLDER\\application.exe for example).
<body onLoad="javascript:runcmd();"> Note that due to security riscks, usually a confirmation dialog will appear before running the application requested. The script works well on Internet Explorer. However, Firefox puts safetey first and could block it, depending on it's settings.
written by gumi , December 23, 2007
I want to learn more about javascript
written by Adept Infotech , January 27, 2008
I want to Know the difference between havascript and javascript 1.0
written by Confused , March 05, 2008
How can you run an application from a USB drive. i.e. if I have a .html page on a flash drive and I want to use this javascript within that webpage to launch a java program also stored on the USB flash drive. the FILE="cmd.exe"; looks on the computer, how do you change this to look in the USB drive where the .html page this javascript code is running from is stored? Thanks
written by hamza , June 17, 2008
hi , i like this but how i can remove the confirmation messeg window before running the application requested and run directely my application requested Do you need more help? Ask now!
|
|
| Last Updated ( Sunday, 22 April 2007 ) | |