DugAdmin
asked on
Write Windows Username Into Input Field - Important
I need a javascript or VB code to display the visitors windows username in a input field as a default value.
I was wondering if this little VB script might help:
<script language="VBScript">
Set WshNetwork = WScript.CreateObject("WScr ipt.Networ k")
WScript.Echo "Domain = " & WshNetwork.UserDomain
WScript.Echo "Computer Name = " & WshNetwork.ComputerName
WScript.Echo "User Name = " & WshNetwork.UserName
</script>
Is there some way to display WshNetwork.UserName as a value in an input?
Thanks
DugAdmin
I was wondering if this little VB script might help:
<script language="VBScript">
Set WshNetwork = WScript.CreateObject("WScr
WScript.Echo "Domain = " & WshNetwork.UserDomain
WScript.Echo "Computer Name = " & WshNetwork.ComputerName
WScript.Echo "User Name = " & WshNetwork.UserName
</script>
Is there some way to display WshNetwork.UserName as a value in an input?
Thanks
DugAdmin
ASKER
Thanks for your reply, ill get back to you if it works
ASKER
Sorry, the code didn't seem to work
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<input type="text" value=<%=Environ("UserName