|
|||||||
| JavaScript JavaScript (not Java) Discussion and technical support, including AJAX and frameworks (JQuery, MooTools, Prototype...) |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all,
I would like to open any program on a computer, using JScript. I have this little piece of code here... Code:
function run(url) {
var File = url;
var WSH = new ActiveXObject("WScript.Shell");
WSH.run(File, 1, true);
}
HTML Code:
<a href="#" name="cmd.exe" title="Cmd" onClick="run(this.name); return false;">open cmd</a> Now another example... HTML Code:
<a href="#" name="C:\Program Files\Internet Explorer\iexplore.exe" title="Internet Explorer" onClick="run(this.name); return false;">Internet Explorer</a> This DOESN'T work... I think it's because of the spaces in the url... What should i do to make this work? Ruben |
|
#2
|
|||
|
|||
|
Problem solved, now another one...
Problem solved... I used the MS-DOS 8-character name for the maps... Now it works great in Internet Explorer (8), but it doesn't work in Chrome or Firefox... Anyone knows how to get it to work?
Thx, Ruben |
|
#3
|
|||
|
|||
|
ActiveX Objects are IE only. You can try using plugins that the user would have to install for other browsers, or better yet there must be a better solution for the problem at hand. What is the problem this solution is trying to fix?
|
|
#4
|
|||
|
|||
|
I know that ActiveXObjects are for IE only... But what could i use instead?
|
|
#5
|
|||
|
|||
|
I already told you. You would have to create plugins for each browser you wanted to use them in. Again, there is probably a better way to solve the problem at hand. What is this solution trying to fix?
|
![]() |
| Bookmarks |
| Tags |
| javascript, jscript, program |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|