I am developing a web application in perl that will require a test of the username as read from the Windows environment table - which I understand can only be achieved with ActiveX in Javascript.
So I knocked up a trivial test to see if I can read it - which works fine when I run it locally (in IE of course) ... but when I upload to the server and try to run it, doesn't do anything.
Am I missing something trivial here?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Test JS-ActiveX</title>
</head>
<body>
<p>The Environment Variable for Username</p>
<SCRIPT type="text/javascript">
var wshshell=new ActiveXObject("wscript.shell");
var uname=wshshell.ExpandEnvironmentStrings("%username%");
alert(uname)
</SCRIPT>
</body>
</html>
Many Thanks
So I knocked up a trivial test to see if I can read it - which works fine when I run it locally (in IE of course) ... but when I upload to the server and try to run it, doesn't do anything.
Am I missing something trivial here?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Test JS-ActiveX</title>
</head>
<body>
<p>The Environment Variable for Username</p>
<SCRIPT type="text/javascript">
var wshshell=new ActiveXObject("wscript.shell");
var uname=wshshell.ExpandEnvironmentStrings("%username%");
alert(uname)
</SCRIPT>
</body>
</html>
Many Thanks