Posted By:
Animesh_Srivastava
Posted On:
Thursday, August 8, 2002 08:02 AM
Hi,
I dont think it is possible unless you are having a control installed on the clients machine. A simple dll which just calls the GetUserName() function of advapi32.dll will be sufficient. All you need to do is then instantiate your dll in a javascript function and make a call to it.
But the really big issue here is that your users should trust your dll and be ready to install it on their machine. Ofcourse, this is no surprise because once you have your dll on their machine, you can do almost anything. Though advapi32.dll itself has this function, but I think it cant be instantiated. So you will have to wrap it in a dll of your own. Once the username is available to the javascript function, it will be easily available to any section of your code (jsp,applets etc.)
Hope that helps.
Animesh.