Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-20-2012, 11:04 AM   PM User | #1
taltcher
New to the CF scene

 
Join Date: Jun 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
taltcher is an unknown quantity at this point
Get current logged-in windows user in google chrome

Hello everyone, I have a question for you: I have built a web
application, until now, used it only with internet explorer. I'm now
want to make it usable in google chrome as well, but there is one
thing I can't work out yet: In my javascript code, I've used an
ActiveX object in order to fetch the current logged in windows user.
As I know, ActiveX will not work on google chrome, but my question is
if there is an alternative way in order to fetch the current user in
google chrome.
Thanks in advanced,
Tal Tchernihovski,
taltcher@gmail.com
taltcher is offline   Reply With Quote
Old 06-21-2012, 03:17 AM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,210
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
In a word, "no."

And there's no way to do it even in internet explorer if the user refuses to install your ActiveX control. Solutions that use ActiveX controls pretty much only work in inTRAnet situations, inside a company where the IT department can dictate to all users just what software they will use.

You *might* be able to get something to work in Chrome/Firefox/et al. using a *JAVA* applet (Java, not JavaScript), but you will have the same problem: If the user refuses to install your unsafe applet, you will get nothing.

Users should never install controls like these, because any control that can get the user's Windows information can also erase the hard disk, steal all content from most any place on the disk, capture keystrokes and so steal passwords, etc., etc., etc. In short, if you have users who really really really trust you, you maybe can do this. Otherwise, forget it.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 06-21-2012, 07:36 PM   PM User | #3
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,462
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
you should just ask the user.
not only does that work on every browser, it means i can use the app from a guest profile or someone else's computer.

it's not like anyone can't make a window's user account using any name they want...
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.6% IE9:9.8% IE10:10%
rnd me is online now   Reply With Quote
Reply

Bookmarks

Tags
javascript

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:55 AM.


Advertisement
Log in to turn off these ads.