I was wondering if anyone knows of an alternative to using ActiveX to grab the logged in Windows username, perhaps an Alpha function that I may be overlooking. Currently I grab the username by initializing an ActiveX control via javascript as below:

var WinNetwork = new ActiveXObject('WScript.Network');
WinNetwork.UserName

But in order to get it to work the 'Initialize and script ActiveX controls not marked as safe for scripting' option in IE must be enabled. I don't feel that is too safe, even though the site is trusted, but it's was the only way I could find to get what I wanted to work.

Any suggestions?

Thanks,

-Doug