Getting Unix login name or home dir from client-side JavaScript

T

Toralf Lund

Is there any way at all I can get a user's login name from within
JavaScript on Unix/Linux with Mozilla browser. If not, how about the
home directory? I know there are *usually* variables accessible via
navigator.preferences() that contain the info, but I have found none
that can *always* be expected to exist.

- Toralf
 
G

Grant Wagner

Toralf said:
Is there any way at all I can get a user's login name from within
JavaScript on Unix/Linux with Mozilla browser. If not, how about the
home directory? I know there are *usually* variables accessible via
navigator.preferences() that contain the info, but I have found none
that can *always* be expected to exist.

- Toralf

You have no access to that information in client-side JavaScript in the
default security environment.

Signed scripts can access window.navigator.preference() on Netscape 4,
but there does not appear to be anything like that on Mozilla: <url:
http://www.mozilla.org/docs/dom/domref/dom_window_ref.html#1004028 /> or
IE: <url:
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_navigator.asp
/>.

Even in Netscape 4, the list of things you can get from
window.navigator.preference() is fairly limited: <url:
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/nav.html#1194000
/>. The list doesn't seem to include the current OS user or the home
directory path.


--
| Grant Wagner <[email protected]>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-developer/upgrade_2.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top