I have created a web application. In it I need to get the username from the client machine. I use the following code to do this:
var sUser
function getUserName() {
var oNet, cInitial, startTime, sSQL;
oNet = new ActiveXObject("WScript.Network"
;
// Get the user name.
sUser = oNet.UserName;
frmMain.UserID.value=sUser;
}
function go(){
getUserName();
frmMain.submit();
}
The "go" function is called when the user clicks on a login button. Everything works fine when I use it on my local machine. However, when I move it to the server I get an error message that states that "Automation server can't create object".
What can I do to get this to work? WScript.exe does exist on the server.
TIA
Nate
var sUser
function getUserName() {
var oNet, cInitial, startTime, sSQL;
oNet = new ActiveXObject("WScript.Network"
// Get the user name.
sUser = oNet.UserName;
frmMain.UserID.value=sUser;
}
function go(){
getUserName();
frmMain.submit();
}
The "go" function is called when the user clicks on a login button. Everything works fine when I use it on my local machine. However, when I move it to the server I get an error message that states that "Automation server can't create object".
What can I do to get this to work? WScript.exe does exist on the server.
TIA
Nate