Far too late to help abhishekitb, but it can be used by somebody else who asks the same question.
Even if environment variables work well, as NeoPa said, this works too :
Note that in the same way, you can get the computer and the domain name.
Tested on IE... 8... !!!, under Windows XP (sorry, nothing else at hand atm).
Even if environment variables work well, as NeoPa said, this works too :
Code:
var ActX=new ActiveXObject("wscript.network");
alert(ActX.username);
Code:
alert(ActX.computername); alert(ActX.userdomain);
Comment