Opening Programs On An Intranet - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Opening Programs On An Intranet

TezdreadTezdread Posts: 1Member
Hi all,

I was given a bit of JavaScript in the hope that it would work so that I would be able to open a program by clicking a link on an intranet web page but I am getting errors with it and can't work out why.

Here's the script after adding the HTML.



nav global

function RunProgram('netscape'){
var objWSH = new ActiveXObject("WScript.Shell");
var retval = objWSH.Run(progName,1,false);
}



test



For reasons I don't know I am getting these error messages.

When the page loads I get errors on the page.
Line: 5
Char: 23
Error: Expected indentifier
Code: 0
URL: File://C:Documents and settingsAdministratorDesktop est.htm

When I click the link I get the following message.

Line: 1
Char: 1
Error: Object expected
Code: 0
URL: File://C:Documents and settingsAdministratorDesktop est.htm

All I can see from the error is that the URL is pointing to the actual test page but I don't know much about JavaScript and can't fix the problem so was hoping someone here could?

Thanks in advance for any help.

Sign In or Register to comment.