How do I get the User Id of the logged on user from the client/browser?
Apr 6th, 2008 19:51
ha mo, Dave Clark, Colin Fraser, Jayaram H,
What you can do is ask for the User to put into a prompt their name if
visitors feel at home, but the real question is why would you want to?
var username=prompt("Hello, please write your name in the box
document.write("Welcome to my page, "+username+".!");
In the page you can also add the name anywhere it is appropriate..
However, part of the real problem we have now it that there is less and
less privacy on the web, so why would you want to make that worse?
To answer the question as asked (and leave off the brow-
that function -- for security reasons. For business support in an
intranet (or local) environment, there is more you can do if your
business uses IE as its browser of choice. But that is a question
specific to JScript. ;-)