This isn't really a javascript question, I think. I think this is a question about how to get the Windows File Sharing name of a client who is connecting to the website. The long and short of it is that you have to have http://samba.org (Samba File Sharing) or run the perl script on a windows machine with microsoft networking. There are perl modules that create an interface for you to samba (search cpan for a list). I think you'd have to do some kind of funky reverse lookup by IP address.
# Environment variables aren't particularly safe. # Make sure you clean the address first $address = $ENV{REMOTE_ADDRESS}; $name = `nmblookup -A $address`; # parse $name for the information you actually want. # nmblookup returns a lot more information than just name
If you don't have samba installed, you are probably out of luck. You could try a search for SMB networking for the server OS you are running. If you are running the script on a windows machine, you'll have to figure that command out for yourself. It probably has to do with 'net' or something...

In reply to Re: Using CGI (Perl) and javascript at the same time by saintbrie
in thread Using CGI (Perl) and javascript at the same time by krt6

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.