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("WScript.Network")
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?
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
<input type="text" value=<%=Environ("UserName