"Jacob" <ya***@1.1> wrote in message
news:41********@news.bezeqint.net...
"Hywel Jenkins" <hy**********@hotmail.com> wrote in message
news:MP************************@news.individual.ne t... In article <41********@news.bezeqint.net>, ya****@c.v says... Hello all
How i can get current username from win2000/xp
in javascript
best regards
var username = prompt('What is your username?');
from the system not from the user
You can't in a cross-platform, cross-browser way in the default security
configuration.
Even using a particular platform (Windows) and a particular browser
(IE), you still cannot in the default security configuration.
You would have to reduce the security settings to a laughably low level,
or add the site to the list of Trusted sites to get it to even prompt
you to allow the ActiveX control needed to make it work to run.
To reduce your security settings:
Tools > Internet Options...
Security tab
Internet zone
Custom Level...
Under ActiveX controls and plug-ins
Locate "Initialize and script ActiveX controls not marked as safe for
scripting"
Set it to "Prompt" (or "Enable" if you really enjoy having your computer
taken over by everyone else on the Internet)
To add your site to Trusted Sites:
Tools > Internet Options...
Security tab
Trusted sites zone
Sites...
Type the site, click Add
Note that for a corporate environment, the corporate Intranet could be
added to everyone's computer using Group Policies.
--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ -
http://jibbering.com/faq