Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.