To get the username, I use this code in jscript:
Set X = CreateObject("WScript.Network")
ActualUser=X.UserName
But when I view the form using "Design Preview" it works, but if i publish it on sharepoint it doesn't work. Does it need to be full trust? Now it's domain security level and I cannot use .net framework. Thank u!