Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 2nd, 2003, 11:22 AM
Registered User
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do I collect windows log on

Is there any way to collect the PC username / log on name as part of the form dataset using Javascript?
Old September 2nd, 2003, 01:13 PM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

Javascript only has access to the browser DOM and I don't beleive that any type of windows specific information is available to it. If you building something that's going to be used with I.E. on a windows platform you might be able to find something in a JScript (Microsoft's JavaScript) reference that is specific to accessing I.E. information.
Old September 3rd, 2003, 02:53 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post

I agree with planoie - client-side javascript is not much use for this

if you use NTLM authentication then the browser will send the username to the webserver. If its possible for you, you could turn your HTML page into, say, an ASP page and populate a javascript variable with the username, from Request.ServerVariables("LOGON_USER"). Then you would have the logon name available in your client-side js.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Oracle stored proc Bulk Collect kulkarnimonica ADO.NET 1 November 6th, 2007 07:42 AM
Can't get Log to write the Log.txt file jnbutler BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 3 July 31st, 2007 04:04 AM
How to collect values? kirks PHP How-To 1 August 28th, 2006 01:12 AM
AppException Class -Log Error to Event Log bekim BOOK: ASP.NET Website Programming Problem-Design-Solution 7 December 7th, 2004 01:01 PM
collect a number Abhinav_jain_mca ADO.NET 6 September 1st, 2004 09:18 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.